Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

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

-1
votes
0answers
7 views

Crop classification in Earth Engine [on hold]

I want to implement Dynamic Time Warping(DTW) crop classification in Google Earth Engine. I have gathered the sample data for NDVI values for each pixel in a defined region over a particular number ...
-1
votes
0answers
10 views

OGC protocols in JavaScript libraries [on hold]

I need to find the best complaint spatial JavaScript library with OGC protocols and I have done a quick research. I don't pretend to be as exhaustive as in this post: comparing-various-javascript-...
0
votes
0answers
7 views

How to filter a csvLayer based on attributes?

Ill start out by just explaining what I'm trying to achieve. I'm running an arcgis application based on the javascript API. I'm Rendering a CSVLayer into my SceneView like such: require(["esri/Map", ...
1
vote
1answer
20 views

Mapbox gl offline

I'm trying to prepare mapboxgl app which works offline, I want to use only javascript engine, local rasters and geojsons. How to avoid connection to mapbox tiles? <script> mapboxgl.accessToken =...
0
votes
0answers
13 views

Failed to complete the task about the ServiceAreaTask

When I am trying to do the task about the ServiceAreaTask, the callback can not be executed. This is my code: <html> <head> <meta charset="utf-8" /> <meta ...
0
votes
0answers
8 views

ServiceAreaTask with JavaScript

When i am trying the ServiceAreaTask with javascript4.11,there is a bug that the callback cannot be executed. This is my code:serviceAreaTask.solve(params).then(showServiceAreas);
0
votes
2answers
31 views

Google Earth Engine: how to negate the .and() operator on an image with NULL values

How does one negate a ".and()" operation on an image in GEE if this image does not contain 0/1 values but NULL/1 values? From the documentation: not() - Returns 0 if the input is non-zero, and 1 ...
0
votes
0answers
23 views

Map component .getWidth() is not a function (GeoExt3, MapFish, OpenLayers 4)

I'm trying to work through the tutorial here*. But I'm discovering something unexpected in terms of my map component. The app code here. My layers, maps, and map component are created (successfully) ...
1
vote
0answers
20 views

Simplifying Multiple neighbouring Polygons, removing gaps and overlaps

My main goal is to simplify multiple polygons, avoiding overlaps and gaps between them. My initial approach was: Find intersections for each polygon so that I end up with an array of polygons, each ...
1
vote
0answers
28 views

Not able to display KML file - OpenLayers

I tried to load my KML file from one of the OpenLayers examples import Map from 'ol/Map.js'; import View from 'ol/View.js'; import KML from 'ol/format/KML.js'; import {Tile as TileLayer, Vector as ...
1
vote
0answers
4 views

Map-box layer to zoom

I have used a sector in my Geo map using turf.sector(),and using add layers() filling the sector with colors. Now how can i add zoom option to this sector.? I want it to reduce size on zooming in
0
votes
1answer
50 views

Create layer based on input parameters and zoom in OpenLayers 5

I have a vector layer which i statically load all the features from the JSON file. What I want to do is to create layers dynamically based on the user input. The user will choose district code, for ...
2
votes
2answers
30 views

Setting Labels on Vector features in OpenLayers 5

I am following this very big example to set labels on the style of the vector but it's confusing. The labels should be the Plot numbers, of each feature, which come from the JSON file. Also i have ...
-2
votes
0answers
20 views

Local Moran's I index in JavaScript [closed]

There are statistics on the population, I want to do a spatial analysis and use the local Moran index. On the ArcGIS site there is a sample code, only written in Python, I have never written on Python,...
0
votes
1answer
14 views

Normalize OSM geometry to 1x1 coordinate system

I'm extracting a couple of geometries with overpass turbo and need to "normalize" their shape from lat-lon to [[0-1][0-1]] coordinates. The first thing I've tried is probably pretty wrong: get ...
1
vote
1answer
24 views

OpenLayers 5: add Interaction and style selected feature

based on this example addInteraction adds opacity, so I am setting a new style for each selected feature, however the clicked features remain red. I only want to style with the red border only one ...
1
vote
1answer
20 views

Store geometry change on modify interaction OpenLayers

I am using OpenLayers modify interaction with events modifystart and modifyend. I am trying to remember state of feature before it is modified. I do it this way: var modificirane_cestice=new Object()...
0
votes
1answer
22 views

How do I access data for each pixel within an image and store it in an array in Google Earth Engine?

I want to create an array in Earth Engine that is composed of the NDVI data of each pixel in the image. Below is the code that calculates the NDVI of each pixel in the ROI (a region). I can store the ...
1
vote
1answer
24 views

Styling OpenLayers 5 Vector dynamically

I have a checkbox button, and I am trying to change the variable getStyle dynamically, when jQuery change event is triggered. Though style property doesn't get updated when the event is triggered. ...
0
votes
0answers
12 views

GeoServer printing module : Missing 'spec' parameter

I am trying to use the GeoServer printing module to export a map to pdf. I have installed the plugin as described here. I'm using the default config.yaml file that was installed with the plugin. The ...
1
vote
0answers
23 views

Google Map Curve Between 2 Points Takes a Longer Route

I referred to https://stackoverflow.com/questions/40756305/adding-icon-in-the-middle-of-created-svg-path-in-google-maps to draw a curve between 2 points: one point is close to Seattle, and the other ...
0
votes
0answers
50 views

ArcGIS API 4.11 JavaScript Feature Table Alternative

I cannot find a simple/basic example online of adding a feature table to the bottom of a map in ArcGIS API 4.11 from a Feature layer (using JavaScript). So the functionality would allow you to click ...
0
votes
2answers
47 views

Iterating in ee.FeatureCollection.aggregate_array on Google Earth Engine?

I have a shapefile I made from a list of longitude and latitudes. I extracted the latitudes and longitudes in arrays following this link. I then try to iterate over the arrays using this: for (var i =...
0
votes
1answer
27 views

Understanding gap in Cesiumjs bar chart?

I use Cesiumjs to create a bar chart. I don't understand why there is a gap in the bar? Code Link var viewer = new Cesium.Viewer('cesiumContainer'); viewer.scene.globe....
1
vote
2answers
51 views

Sentinel 2 Surface reflectance Range

I need to get a reasonable Sentinel 2 Surface reflectance using Google Earth Engine, I tried but the values are between 10000 - 0 var ReflectTimeSeries = ui.Chart.image.seriesByRegion({ ...
1
vote
1answer
21 views

Attach the bar's bottom to a location in 3D Cesium

I have the code below on web site cesiumjs. Is there any way that I can fix the bar's bottom at the location (37.786805,-122.45475) on the Earth's surface? The bar here looks like its bottom moves ...
0
votes
0answers
29 views

Leaflet routing machine waypoints with numbers

Is it possible to display numbers near waypoints on map? I create multiple routes in loop and passing waypoints via array. Routes get painted with Leaflet Routing Machine. I want to show number of ...
0
votes
1answer
23 views

Split list by chunks Earth Engine with mean

I am calculating mean temperature data based on historical data. I need to calculate the mean through the years (jan-jan-jan-jan...) and the means within a year (jan-feb-mar-may-jun...). This is ...
1
vote
1answer
61 views

ArcGIS API 4.11 JavaScript - “Click” “drag” stopPropagation()

Using JavaScript in the ArcGIS API, I am querying a feature layer from a Map View, calculating points within a certain radius when the user "click" "drag" with the mouse. I want to be able to stop ...
0
votes
1answer
40 views

Leaflet Routing Machine show option doesn't work

I am adding route to the map and I want to hide instruction (turn left, turn right etc.) but I want to show them later. As I can see there is parameter show for that. If I set show: false I see white ...
1
vote
1answer
46 views

Missing values when calculating mean

I have uploaded a table containing information on river basins within countries (https://code.earthengine.google.com/?asset=users/basins/TFDD_BCU). I want to calculate the mean population density in ...
0
votes
0answers
12 views

How to implement search in a graphics layer?

There is a method that accepts JSON data. Based on this data, points are created and added to the graphics layer. How to implement search in a graphics layer? I found an example of how to implement ...
0
votes
0answers
11 views

Sample regions collecting more points than actual

Trying to extract values by points in Earth Engine by sample regions in NDVI stacked image. My fusion table contains only 1200 features but during the process, it throws me an errors "Feature ...
0
votes
1answer
36 views

Can't close custom popup at fixed position

I created this custom popup at a fixed position. When clicking a marker a popup opens, I'm able to close the popup and open another one clicking a different marker, then I'm not able to close the ...
1
vote
0answers
13 views

Extracting tree cover values from Hansen to feature collection using Google Earth Engine?

I would like to extract mean pixel value of treecover 2000 from Hansen from each geometry (polygon) of different shapefiles that I have import into Google Earth Engine (var table_comp). I create for ...
1
vote
1answer
78 views

Leaflet Routing Machine calculate routes in loop

I have an array with coordinates ([[54.73, 55.74], [55.66, 54.73]...]). I want to get route from each point to another. E.g. if I have 3 points a1, a2, a3, I want to calculate routes a1a2, a1a3, a2a1, ...
1
vote
1answer
24 views

Leaflet put coordinates of every point in array

I get points using GeoJSON.AJAX and I want to store coordinates in array to pass it later to function that builds routes between points. Now I use this code <script> function our_layers(map)...
0
votes
0answers
27 views

Line chart Chart.js for interactive map

I am working on a webmapping application with interactive data from maps and charts associated in templates, built with Chart.js. The template (mustache) is linked to a shapefile map layer containing ...
1
vote
1answer
49 views

Smoothing/interpolating across images in an ImageCollection to remove missing data

I have some code that is working properly to calculate the monthly NDVI averages for the previous two years from a date but I sometimes have missing data in some of the months and I would like to get ...
1
vote
1answer
56 views

Leaflet routing machine get route summary without drawind route

I am using LRM to calculate routes. And I need data about this routes. Now I'm just learning how to exctract this data so I can use it further. I have two routes var routing1 = L.Routing.control({ ...
0
votes
1answer
38 views

Creating\rendering a heatmap not showing up

I am having a problem rendering a heatmap. I am sure the heatmap is created but it doesnt display when I replace or add a renderer. var TF = new FeatureLayer({ url:"https://services3.arcgis.com/...
0
votes
0answers
30 views

How to judge a point with Lat and Lon about whether it is in land or sea?

I just want to judge a point with Lon/Lat about whether it is in land or sea in my front-end program. I want to konw how to do it with JavaScript. Any WebAPI can be used freely?
0
votes
0answers
12 views

Adding featureSet into a featureLayer (dynamic renderer)

I'm trying to use a renderer and a legend on data from a featureSet, it displayes symbols and popups but the renderer fails. The data comes from a featureLayer but I display it with view.graphics so ...
2
votes
2answers
41 views

OpenLayers overlay bubbling problem

Regarding on the previous question asked https://gis.stackexchange.com/a/303372/119333, solution from best answer is implemented and its working. I am rendering tab panel inside popup overlay and you ...
0
votes
1answer
43 views

Filtering area through defined time period using Google Earth Engine?

I tried the following code in the Google Earth Engine through the various countries which have different dry season. But I cannot understand how to iterate the code. can anyone generate iteration ...
0
votes
1answer
38 views

Creating correlation chart in Google Earth Engine?

I want to create a correlation chart between LST and NDBI for an area in Google Earth Engine (GEE). I have already created separate charts for both of these and now I need to know the correlation ...
0
votes
0answers
25 views

Creating an image collection from latest computed median images in Google Earth Engine

I want to create an image collection where all the median images can get stored so that later on it can be exported to drive. Link to my code: https://code.earthengine.google.com/...
3
votes
1answer
53 views

Google Earth Engine: batch image export with JavaScript API

My goal is to export a large mosaic into tiles defined by individual features in a vector grid (FeatureCollection). GEE debugging guide states that Export is a client-side function and won't ...
0
votes
1answer
16 views

Building a dynamic querytask 4.11

Learning the js api i tried to make a querytask that will query a layer and update graphics on change. I think the problem is in my success("succ") function. I made this codepen: https://codepen.io/...
0
votes
1answer
52 views

Converting a list of lists to table and export in CSV in Google Earth Engine

I want to convert data presented in a list of lists (JSON) in a table so that I can export it in CSV format. The following is the link to my code. https://code.earthengine.google.com/...