Questions tagged [javascript]

JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions.

Filter by
Sorted by
Tagged with
1
vote
0answers
20 views

How to drag MarkerCluster spider?

I am using the leaflet MarkerCluster plugin. Can we lengthen and shorten the spider legs with drag and drop method in this plugin? or how can we make popups like this
0
votes
0answers
9 views

R Leaflet: Assign multiple groups to a layer to filter data and change column represented

I am trying to find a way in R leaflet to include overlay buttons which filters out groups in the data. I also need to include radio buttons which switch the column which is being represented in the ...
0
votes
1answer
8 views

Creating a popup when hovering a line in Mapbox

I have a custom line in mapbox that displays a popup when you click it, how can I make it so it shows only when you hover it ? I changed from "click" to "mouseenter" but it did not ...
-1
votes
0answers
35 views

Is it possible to develop a GIS Web Application using exclusively Python and SQL? [closed]

I want to develop a GIS Web Application and I just have decent skills in Python and SQL. I am okay with the database side using PostGIS and I have several years of experience using GIS tools (ArcGIS, ...
0
votes
0answers
22 views

How to create a Legend with Points. Same size in Legend and Map. Leaflet

I am trying to create a Legend in Leaflet that contains the circles in the map. But, the size in the legend should the same size that it is in the map. My code is next. function getRadius(pop) { var ...
0
votes
1answer
16 views

Satellite image in OpenLayers

I would like to know if there is a satellite map for OpenLayers. I made the following code: new ol.layer.Tile({ // A layer must have a title to appear in the layerswitcher title: 'Stamen', // ...
0
votes
0answers
17 views

OpenLayers Map Click Event not getting called in ReactJS

Problem: OpenLayers(v6.3) MAP is visible in REACTJS(16.13) but click event on MAP is not getting called. Purpose: I want to place a marker and handle its click event to show some POPUP with data. Code:...
0
votes
0answers
38 views

How to stop appending map [closed]

I have a map on-page and also I have a map on modal. When I click the add button then modal shows but It automatically adds another map on my page's map div. How to stop it guys my page like this <...
0
votes
0answers
11 views

myMap is there a way to authenticate

Is there a way to get the mymap even it was restricted on sharing. var src = "https://www.google.com/maps/d/kml?mid={id}&forcekml=1" geoXml = new geoXML3.parser({ map: map, ...
0
votes
0answers
17 views

Checking for image errors in Leaflet [closed]

I have a map with popups, and those popups display an image (in this case, screenshots from traffic cameras). The image sources are external URLs. Some of them work, others don't. The URL won't give a ...
1
vote
1answer
20 views

GeoServer SQL VIEW

I am trying to add layer through SQL VIEW GeoServer. Everything is fine just, GeoServer is not able to take some chars correctly. When name parameter includes dash "-" character, the WMS not ...
0
votes
1answer
34 views

GeoServer does not display/preview pgRouting Layer

I am developing a routing application using GeoServer, PostgreSQL, HTML and JavaScript. To display the routing layer on the HTML webpage, I followed the instructions from this workshop. GeoServer does ...
0
votes
1answer
24 views

Convert lat/lng to x/y pixel 2D PNG image

I have a 2D PNG map which I know the corners of my image and I also have the image size all as below: image size: 600x600 pixel top-right coordinate: (35.74706129,52.08012633) => (lat,long) ...
1
vote
0answers
30 views

Iterate over a Feature Collection in Google Earth Engine

I am getting the results of segmentation as a raster file that I need to convert into vector. My study area is large and the spatial resolution is high (2.26402m), so Google Earth Engine does not ...
0
votes
0answers
16 views

Openlayers: add padding to zoom in on a cluster

I need to add a padding to a zoom in on cluster function. I've used a part of this code to do this. var zoomCluster = function(pixel) { var feature = map.forEachFeatureAtPixel(pixel, function(...
0
votes
1answer
12 views

Geoserver cql filter, closing single quote in URL is not read

I got a very strange behavior when using CQL filter. Here's the URL result when using AJAX http://localhost/geoserver/visualization/ows?service=WFS&version=1.1.0&request=GetFeature&...
1
vote
1answer
26 views

L.divIcon and aria-label attribute

I have three type of layer and for each layer a different marker, which I styled in CSS. The problem now is, that if someone uses VoiceOver or something like this, it's reading the 'html'. In my case, ...
0
votes
0answers
31 views

Results of Variable Importance of RF Classifier in GEE

I create a RF modulu in GEE like this; //Random Forest Result Function Module exports.getRfResults = function(image, title, bands, trainPoint, testPoint, area, label) { //Create Sample Points ...
0
votes
1answer
14 views

What expression works with setLayoutProperty in mapbox

I am able to toggle the opacity of individual groups within a tileset. Unfortunately this does not hide the data when clicked on. As the layers are stacked this is a problem. const toggleGroups = (...
0
votes
1answer
19 views

Unable to insert geometry point using TypeScript and MassiveJS

I am trying to simply trying to validate a point before I actually insert it into the db. I am using the following: TypeScript: 3.5.2 MassiveJS: 6.4.0 PostgreSQL: 11 PostGIS: 2.5 const ...
1
vote
1answer
56 views

Google Earth Engine: Evaluate classifier of output type regression

Background According to the Google Earth Engine documentation for supervised classification, the accuracy assessment of classifiers such as ee.Classifier.smileRandomForest can be done using a ...
0
votes
0answers
10 views

Converting .OBJ to .CTM file using openctm

I would like to convert a 3D .OBJ (Wavefront OBJ file) file to .CTM (OpenCTM 3D mesh file) format. I know that openctm API (http://openctm.sourceforge.net/) have both Python and JavaScript ...
0
votes
1answer
24 views

How to mask PCA on Google Earth Engine

I am trying to perform PCA on MODIS imagery. I got my code to run using MODIS (it also worked for Landsat), but when I mask my MODIS collection the PCA fails. This had to do with missing values, as ...
0
votes
1answer
26 views

Detecting line intersections between MultiPolygon and LineString in Turf.js

I am trying to write a section of JavaScript code that allows a user to analyse a route they have plotted on a map. After the user has finished plotting their route, I want to determine if the route ...
1
vote
1answer
26 views

Google Earth Engine: Get Variable by name string

Situation I have a list of variables: // Example data var data_2016 = 7; var data_2017 = 9; var data_2018 = 5; var data_2019 = 2; I would like to loop through a selection of these variables, by ...
0
votes
0answers
35 views

Turnoff layer not selected in form element Leaflet

I'm super stuck, pulling my hair out. I have graduated symbol map in leaflet of wildlife camera rates of detection. I have a form element that selects all species, bobcats, coyotes o grey foxes. All ...
1
vote
0answers
11 views

OBJ file not loading in GIScene.js

I am trying to load a OBJ file in GIScene.js. Unfortunately, the OBJ file is not getting visualized inside scene of GIScene.js, even though the scene of GIScene.js is getting visualized. There are no ...
1
vote
1answer
60 views

Combine leaflet-tilelayer-mask and Leaflet.TileLayer.ColorFilter plugins

I am trying to color my tileLayer mask differently and I found the colorFilter plugin. I can't seem to figure how to use the color filter tile created in my mask tileLayer. let map = L.map("map&...
0
votes
1answer
33 views

Removing previous layer when new layer is select from drop-down menu?

I have a drop-down with some options in it, after selecting one option and button clicking I get the text and my shapefile from the GeoServer which is added to the map. So when I click on the first ...
0
votes
1answer
41 views

How to remove Landsat 7 SLC gapmask in Google Earth Engine?

I am using the Collection 1 Tier 1 Surface reflectance image collection. I have applied the GEE provided cloudmasking to this collection as well as other Landsat collections. On export, striping is ...
1
vote
1answer
39 views

Clipping imagery to regions of interest with Google Earth Engine before exporting

My code currently collects all Landsat imagery and then creates a mean summer NDVI for each year. I would like to clip the the summer raster to an vector polygon shapefile (such as attached). ...
1
vote
0answers
31 views

Getting longitude and latitude from a GraphicsLayer using ArcGIS API for JavaScript ( 3.32 )

Update : I have to position a button at the bottom of a layer, i try with Point, fullExtent and xyToLngLat. but the result seems offset sometime. I have a hard time getting longitude & latitude ...
1
vote
1answer
30 views

Set center coordinate for Leaflet-tilelayer-mask layer

I am working with this Leaflet plugin: Leaflet-tilelayer-mask and I want to specify the mask center coordinate as opposed to it picking the base map's center coordinate. Tips on how to achieve this? ...
0
votes
0answers
9 views

Cesium: How to retrieve the UUID of the building model onclick?

I have 3D building models, being loaded via JSON with gltf format. I would like to retrieve the individual model's uuid when the user clicks on the building.How can I do it on cesium platform? Example ...
1
vote
1answer
76 views

Accessing ArcGIS data over HTTP

I am attempting am building a map data React app using GIS data. I am accessing public GIS endpoints. The endpoint is http://gis.infrastructure.gov.au/infrastructure/rest/services/KeyFreightRoute/KFR/...
0
votes
0answers
48 views

Google Maps API - .seticon size based on zoom level

I did look up this question on here but the answer used 'new google.maps.MarkerImage(' which has been deprecated, and I can't get anything else to work. I think it has to do with my array of markers, ...
1
vote
1answer
41 views

Unable to load .glb (GLTF) in a scene of GIScene.js

I would like to load a .glb file, which is the binary format of GLTF in a scene of GIScene.js (https://giscience.github.io/GIScene.js/). <html> <head> <meta charset="UTF-8&...
0
votes
0answers
30 views

OpenLayers projection map issue CRS EPSG:32639

I would like to use CRS EPSG:32639 in map. const initMap = (layerTypesList: LayerPackage[], id: number) => { map = new ol.Map({ target: 'map', layers: [...loadLayers(layerTypesList, id)], ...
1
vote
0answers
28 views

OpenLayers 6 add rulers

I'm trying to add vertical and horizontal rulers on top of my map. In OpenLayers 2 I have seen code that had VerticalRuler and HorizontalRuler as attributes but I can't find something similar in ...
1
vote
1answer
20 views

Layers not appearing even after source is loaded

I have written this code to source USPS postal route data from ESRI, which is to be displayed on a map. The code works fine, the data source is also loaded, as per the console.log I put in place, ...
1
vote
1answer
50 views

Detecting self-intersecting polygons in OpenLayers [closed]

I am using OpenLayers Version: 6.3.1. I am allowing users to draw a Polygon in my website. I want to validate the polygon by checking for self intersection. Like This: I referred to Detecting polygon ...
1
vote
0answers
24 views

Add data from a REGION FeatureCollection to my polygons FeatureCollection [duplicate]

I have generated a FeatureCollection of polygons and calculated the centroid and added it. I now want to pull in some data from FAO/GAUL/2015/level2 dataset with fields such as ADM2_CODE etc. This can ...
0
votes
1answer
46 views

Exporting a GIF of Sentinel-5P image collection with country outlines

I've been stuck on this for a couple of days, and I feel like I need a second set of eyes for this. I have made a script that calls the S5P image collection for NOx emissions over period of time, and ...
0
votes
1answer
40 views

Add Admin CODE to feature collection

I want to add the ADMIN2_CODE from the dataset FAO/GAUL/2015/level2 to a featurecollection I have created to get information on some forests in Wales. I have added the elevation to the polygons but I ...
1
vote
0answers
39 views

Highlight polygon on mouse over in Leaflet?

I am doing a map on Leaflet and I would like to know how to put my polygons highlighted visually in some way when they are covered with a mouse a bit like that: http://www.gistechsolutions.com/leaflet/...
0
votes
1answer
75 views

moveToLocation and open Marker-Popup automatically

For reference: I use L.Control.Search to search for my Marker. It's this Plugin: https://github.com/stefanocudini/leaflet-search/blob/master/examples/multiple-layers.html And this is the working ...
0
votes
0answers
19 views

Snap to shapes Google Maps

I wish to add snap to shape feature of openlayers shown here Snap Interaction to Google Maps drawing Library. Is there a way that this can be achieved. Here is the bare bone code of the Google Maps ...
1
vote
0answers
15 views

Create Polygons from Polylines

I am creating an application using Google Maps Drawing Library. In the application the user can draw a bunch of PolyLines as shown in the picture below. Please disregard the color variation of ...
1
vote
0answers
50 views

Downloading black TIFF files

I have been downloading Sentinel2 and Sentinel3 images for Convolutional nerual networks but I keep getting black TIFF files. Can you check my code? I have been using the GEETOOLS by fitoprincipe, ...
1
vote
0answers
31 views

Finding the intersection of an array of markers across multiple layer groups Leaflet

I have two challenges related to this. The first(1) is that I have created a bunch of variables that store the data needed for my markers and I cannot reliably add markers to layer groups when storing ...

1
2 3 4 5
59