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
1answer
19 views

Add WMS to OpenLayers after click

I have a working WMS service under http://localhost:8080/geoserver/nis/wms?service=WMS&version=1.1.0&request=GetMap&layers=nis%3Atest Also I have a Node JS application with OpenLayers. In ...
1
vote
0answers
9 views

React Google map . Fix the marker in the center

I want the functionality as Uber/ola app where the marker is fixed in the center evenwhen we drag the map the marker should be fixed in the center. And finally when the drag end we need to get the ...
0
votes
2answers
26 views

Leaflet Feature bindpopup does not display (OnEachFeature)

I am attempting to have a click event popup with some data pulled from Wikipedia and displayed on my Leaflet map for each point that displays GeoJSON data. My data is displayed on map as you can see ...
0
votes
0answers
15 views

Mapnik datasource error connection

I don't know why doesn't render a vector tile. In localhost works perfectly but when I'm working with my production server doesn't work. I have a route to test if my server tile is connected with ...
3
votes
1answer
41 views

Sampling of image collection

I have an ImageCollection of Sentinel2 as follows. var Sentinel2 = ee.ImageCollection('COPERNICUS/S2') .filterDate('2018-01-01','2018-12-31') .filterBounds(AOI)...
0
votes
0answers
39 views

Grouping clustered points within 50 meters and export new data Google Maps

I have tracking device on our company vehicles. It records and track all vehicles movements. Also for every stops for more than 5 minutes it record the current location Lat, Long as "stop" the ...
0
votes
0answers
31 views

How can I get map coords (lat and long) on click [closed]

I am just trying to set a click function, when the map is clicked, anywhere on the map, and return simple lat and long values of where said click function occurred. Below is what I am trying: ...
1
vote
0answers
18 views

How to add text to LineString in OpenLayers?

We use OpenLayers 4.6.5. The code looks as following: const line = new Feature({ geometry: new LineString(points) }) line.setStyle( new Style({ fill: new Fill({ color: 'black' }), stroke:...
0
votes
0answers
22 views

GeoJSON invalid object error when importing from a JavaScript file [closed]

I have a valid GeoJSON object. I am adding it to a Leaflet map. It works fine when I define the GeoJSON object in the JavaScript of the vue.js file where I reference the GeoJSON object. var ...
0
votes
1answer
53 views

Min and Max for each image of NDVI to calculate Em and LST

I am working on my script to calculate LST for all the images in the collection separately and then use the calculated LST to estimate Mean Annual LST. I have calculated NDVI for each image, and the ...
2
votes
2answers
127 views

Determining if coordinates from feature are in EPSG:4326

My idea is before upload a GeoJSON file, check if geometries are in EPSG:4326. I've tried using PostGIS with Find_SRID but return 0 because when I insert geometry I don't know which SRID has the ...
0
votes
0answers
29 views

Trying to get right combination of Leaflet libraries

I've inherited a project which was using an ancient version of Leaflet and some associated libraries, and have now managed to add the Google Mutant to it. It used to use: <link rel="stylesheet" ...
2
votes
1answer
51 views

Different min and max NDVI values with different approaches using Google Earth Engine

I'm trying to calculate the vegetation fraction for land surface temperature calculations of a single Landsat 8 image. I need to find the min and max NDVI of the scene. I've masked the image and ...
1
vote
1answer
53 views

How to export raster of Mean Annual Land Surface Temp from Landsat Imagery?

I am using google earth engine to estimate Mean Annual land surface temp of a local scale from 1984 to 2019 from landsat Imagery. I am having trouble determining a script for my goal, there are many ...
4
votes
1answer
167 views

polyline path to follow a draggable modal

Here is what I am trying to do: on click (right now just click anywhere on the map) will draw the line and display a drag-able modal pop-up, I have static coordinates set for the start point (which ...
1
vote
0answers
40 views

How to create Google map fixed marker with postal address

I use this script to show a Google fixed map It's marker in the center always <script> function initialize() { var mapOptions = { zoom: 5, center: new ...
1
vote
1answer
21 views

There was a problem in setStyle Feature “Uncaught RangeError: Maximum call stack size exceeded”

I'm having problems setting the color for the feature. It only added the color for the first time and then encountered the "Uncaught RangeError: Maximum call stack size overlapped" error. How do I fix ...
0
votes
1answer
19 views

Execute JavaScript code in popup for Mapbox?

I'm trying to embed tweets into the popups for a map I've made in Mapbox. The text of the tweets is displaying properly, but not the styling — the embed code contains a script tag to load a widget for ...
1
vote
0answers
35 views

Contours generated in Leaflet losing coordinates?

I am attempting to use a JavaScript library to generate contours in a leaflet map from a point layer on the map. I have tried this approach with d3 and turf and am getting the same issue where the ...
1
vote
1answer
50 views

Simulate click to map on specific coordinates and layer in OpenLayers?

When a user click on a specific feature, I display a simple overlay (popup). But I need to display this popup on a closest features when a user search a random location. So, I search to simulate the '...
1
vote
0answers
30 views

How to manage JSON data in a Leaflet to control layer [closed]

I want to add this json data connection to the map control. This is my JSON data: [ { "id": "1234", "id_jenis": "15", "nama": "", "cabang": "01", "no_sp": "", "pelapor": "...
0
votes
1answer
46 views

Add legend in a SplitPanel in Google-Earth Engine

I have made a code with a Split Panel (1) , now i what to add a legend like this example: https://code.earthengine.google.com/b5d35a19689ec5698e59f36a9b3ae6f8 this is my original code that I want to ...
0
votes
0answers
41 views

Area fill in Google map, never repeat spotted place

I have this example area in Google Maps: http://jsfiddle.net/4owL5qzd/ The range borders: new google.maps.LatLng(25.774,-60.190); new google.maps.LatLng(18.466,-46.118); new google.maps.LatLng(32....
1
vote
0answers
17 views

Looping workflow across attribute table using Google Earth Engine

I have a shapefile asset loaded with an attribute column called "OBJECTID". I would like to run the following script for every ID number in the attribute table, and produce an output table. /// ...
1
vote
0answers
24 views

List of international upstream areas [duplicate]

I have a list of stations in rivers. I want Earth Engine to return me a list of stations whose upstream area overlaps with at least one other country in addition to the country the station is in. This ...
2
votes
1answer
22 views

Skipping undefined elements when getting catchment area

I have a follow-up question on Population in upstream area (looping over FeatureCollection). I want to calculate the number of people living in the upstream area of stations in rivers. This code works ...
3
votes
2answers
98 views

OpenLayers: Smoothly change tile source on zoom

I'm trying to load tiles from different subdomains depending on my current viewZoom level (i. e. all possible zoom steps). The resolutions for each step are calculated from the user's screen size. ...
2
votes
1answer
45 views

Export image in CSV

I created a small image on Google Earth Engine and now would like to export all its bands in a csv file. With a format like | pixel id | lat | lng | band1 | ....| |----------|-----|-----|-------|-...
0
votes
0answers
34 views

Mapbox GL JS Heatmap Label

I am working from this example on the Mapbox documentation page and I have managed to get points labeled onHover, but have not been able to get the actual heat map layer itself to display information ...
1
vote
1answer
54 views

Google Earth Engine Export CSV MODIS Pixel Data for Multiple Polygons within a Rectangle

Having watched GEE tutorials, pieced together code from several StackExchange questions and received help from Kuik and Jobbo90 I managed to write a code for a MODIS/006/MOD11A1 surface temperature ...
1
vote
1answer
27 views

Losing pixels values when counting by value

I have a script that calculates number of pixels with NDVI values that are higher than 0.3, 0.5 and 0.7. My code runs with no errors, but it get value 0 and doesn't really count. what can be the ...
1
vote
0answers
27 views

Leaflet geoJSON filteration clash with markerCluster and map.on zoomend function

I would like to solve the problem of mismatch between geoJSON filter data and zoomend function. I recently have managed my geoJSON filteration as per the example below: http://www.gistechsolutions....
1
vote
1answer
43 views

How to save point ID when extracting values from bands?

I have vector points that have some external IDs. I would like the point ID column to appear in the result table after extracting spectral values from the bands. 'Latitude', 'longitude', 'time' and '....
2
votes
1answer
53 views

How to skip masked values in bands?

How to skip missing pixel values due they are masked? In the code below, empty lines with missing values in the spectral bands appear in the exported CSV file. var geometry = ee.Geometry.MultiPoint( ...
1
vote
1answer
50 views

Animating Map Layers

Situation: I am new(ish) to the web mapping scene and I have build a web-map using the Cesium API. The scene cycles through a series of 3D polygons representing heatmaps over time. I'm loading the ...
-2
votes
1answer
105 views

Google Earth Engine API map deploy to a website

Can we convert Google Earth Engine code (i.e., which is written in GEE console) to JavaScript so that it can be viewed on a website/app? I have gone through the GEE API documentation (https://...
0
votes
0answers
10 views

Can i use esri/graphics on Node.js?

I'm looking for a way to use esri/graphic on node express server.. I need to build polygons and rotate/ move/ union/ intersect/ etc.. I can use a different npm package but I'd prefer to use the same ...
1
vote
1answer
48 views

Leaflet filter with multiple GeoJSON layer properties

Regarding to the following queries https://stackoverflow.com/questions/59141456/leaflet-problem-with-filtering-the-geojson-layers GeoJSON filtering based on properties in Leaflet not working I ...
1
vote
2answers
85 views

Error creating or submitting a task in Google Earth Engine

I am getting the error "Request payload size exceeds the limit: 4194304 bytes" while I am trying to export certain pixel values clipped to the study area. I am using the following code: Export....
0
votes
0answers
20 views

Creating a custom chart widget in web app builder

I am new to web app builder, I want to create a custom chart widget using data from a rest url. I tried using dijit/chart but was not able to get the results. Can some please post a sample to make ...
-1
votes
1answer
23 views

Exporting images to my Google Earth Engine repository

So I understand that you have repositories in Google Earth Engine where the scripts are stored. I would also like to add images to a repository, particularly in a folder as seen below. I thought that ...
1
vote
0answers
20 views

Leaflet GeoJSON sublayers checked not working

Good morning all, I have been struggling with division of my geoJSON sublayers, as per the query below: Leaflet geoJSON sublayers checked on off I used the proposed code, which seems to bring a ...
1
vote
0answers
21 views

Travel Time Isochrone Map - Http Post request [closed]

I am trying to send a request to Travel Time Platform for an isochrone using the API - https://www.traveltimeplatform.com/ // Coordinates for Manchester Central Foodbank in Lat Lng var ...
0
votes
1answer
43 views

Population in upstream area (looping over FeatureCollection)

I want to calculate the sum of the population living in the upstream area of stations using the hydro package by gena. I think I will have to loop over the stations (using the identifier "GEMS_Stati")....
0
votes
1answer
60 views

Selecting only specific features not all, and dragging and dropping correctly [closed]

First issue: I would like to select only a few features and not select rest Let imagine I have 5 features in below code you will see that I can select all of them. Second issue The second issue is ...
0
votes
1answer
32 views

RGB color space conversion to HSV color space in Google Earth Engine using Sentinel 2 images

I am trying to convert RGB colour space to HSV colour space in GEE. I am using function rgbToHsv() for the same. I am able to get results for Landsat 8 images but not for Sentinel 2 images. The study ...
1
vote
1answer
39 views

Dividing GeoJSON into two separate layers in Leaflet

Basing on this example: http://www.gistechsolutions.com/leaflet/DEMO/sports/sports.html I would like to do the same in my case, however, my way is slightly different: Firstly I have made a major ...
1
vote
1answer
94 views

Styling GeoJSON by Attributes with Cesium

Situation: I have 30 3D heat maps (for 30 years) stored in GeoServer, my goal is to create an animation showing the change year by year. I found Cesium and was really impressed. Right now I am trying ...
0
votes
0answers
14 views

Uploading GPX file to website and displaying it visually

I'd like to create a file upload button and then print the resulting gpx file on the map, could anyone have a look at this code to see where I'm going wrong? body: <form action="/action_page.php"...
1
vote
1answer
17 views

GPX visualiser using JavaScript [closed]

I'm trying to write an HTML page where the user can upload a GPX file and it is then converted into a series of points on a map, using OpenStreetMap. What is the best way to do this? (Using JavaScript)...