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
0
votes
0answers
9 views

ArcGIS API for JavaScript 4x: querytask within collapsable div

I've created a div element inside of the expand widget. The div element holds a drop-down list and a search button. The search button activates a query task. The query function works when the div is ...
0
votes
0answers
5 views

How to get Cog(in AWS S3) tile url?

I have one raster file (Cloud Optimized Geotiff) in AWS S3 bucket. And I want to mapping as a raster tile source using Mapbox GL JS. How can I get the my Cog's tile url..? Should I use tile server?? ...
-1
votes
0answers
31 views

My JavaScript - Google Earth Engine If conditions not work logically well [closed]

My If conditions not work logically. There is no syntax error but logical error. My "sayı_sonrası_2" is 0.377 and my "sayı_sonrası_3" is 0.144. When I put this values into if ...
-2
votes
0answers
26 views

Random forest classification in GEE

I am trying to code a simple algorithm to detect burned areas with random forest, thus I get the following error message: Image (Error) Image.select: Pattern 'b11' did not match any bands Here is my ...
1
vote
0answers
50 views

Cloud-Optimized GeoTIFF overlay on Leaflet?

I want to load external Cloud-Optimized GeoTIFF files onto a Leaflet map as overlays, and manipulate the colors based on user input. I've found examples online that appear to to this exact thing, but ...
0
votes
0answers
29 views

Leaflet - testing react component

I am looking to create unit tests for component below mainly on checking addLayer and removeLayer being called, function App (()=>{ const marker = useRef<L.Marker | undefined>( undefined);...
0
votes
1answer
21 views

Popup not working following feature query using ArcGIS API for JavaScript

I am using the ArcGIS API for JavaScript 4. I'm creating a web map based on this example: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=tasks-query Except I've ...
1
vote
0answers
13 views

Create a start and endpoint on a highlighted feature

I have a highlighted line feature as shown: function highlightFeature(e) { var layer = e.target; layer layer.setStyle({ weight: 10, opacity: .4, color: '#...
1
vote
0answers
13 views

Images are coming noisy after exporting from Google Earth Engine

I'm trying to export images of from GEE, however, these images are extremely noisy and aren't clear. The code I'm using is simply the following where geometries is a Geometry Collection having ...
0
votes
0answers
25 views

Get Layer using GeoServer and OpenLayers [duplicate]

I try to access a layer from GeoServer and display on openlayers by the example here: https://openlayers.org/en/v3.20.1/examples/getfeatureinfo-tile.html Here is the code I'm trying to access: <!...
1
vote
1answer
20 views

How to display multiple markers at different positions on OSM5 using JavaScript

I fetched longitude and latitude from DB and saved it in a 2D array. I pass the array to the JS file. I'm using JavaScript to loop the array and display the markers with their icons. Each marker has a ...
0
votes
0answers
35 views

Problem with CORS WMS plugin Leaflet-Image

I'm having trouble trying to get my map image with the Leaflet-Image plugin. My code: var map = L.map('map', { preferCanvas: true }).setView([43.42851395329958, -3.668450798388781], 23); ...
0
votes
0answers
23 views

How to detect overlapping features from 2 different layers with Mapbox GL JS

I have 2 layers in total, one is a point layer where each point represent the location and attributes of a company, the other is a draggable polygon layer which is regarded as a filter for spatial ...
1
vote
0answers
20 views

Add Prunecluster to searchControl Leaflet

I have a bunch of markers clustered with PruneClucster this way : for (i in propsEspeces) { for (j in propsEspeces[i]) { var marker = new PruneCluster.Marker(propsEspeces[i][j]....
2
votes
0answers
29 views

How to Select Site Point then Zoom to Polygons

The map has a farmLayer of points and a paddockLayer of polygons. (In some countries farmers use the term field instead of paddock.) When the farm is selected with a double click the farmLayer is ...
0
votes
0answers
20 views

How to add a GeoJSON to a map with Leaflet

I need to add a GeoJSON of a shape to a map using Leaflet. My code: var map = L.map('map').setView([43.42851395329958, -3.668450798388781], 23); var geojsonFeature = { "type":"...
0
votes
1answer
11 views

Why ArcGIS JavaScript text label does not show on feature?

My working example here does not show the labeling information on features. var featureLayer; map = new Map("map", { basemap: "satellite", center: [-46.807, 32....
0
votes
1answer
25 views

Two PopupTemplates

I'm using this sample code from ESRI ArcGIS API for Javascript 4.16: https://developers.arcgis.com/javascript/latest/sample-code/widgets-feature-sidepanel/index.html I would like to display these ...
1
vote
1answer
20 views

Google earth engine: How to get yearly DN value by satellites from DMSP-OLS nighttime satellite data

I would like to get the panel data of the nighttime light in Japan and check the correlation between other economic statistics. In order to do that, I have to get yearly digital number value from each ...
-1
votes
1answer
42 views

Bind selected (Algolia suggested) with queried wordpress search terms from db (ajax, json etc)

Since the Wordpress plugin that facilitates this functionality has been deprecated i have decided to leverage the places API https://community.algolia.com/places/examples.html#searching-in-a-country ...
0
votes
1answer
31 views

Open Layers 3 Click in a layer

I'm trying to work with lots of layers and each one of them need a different click action but, with all my layers this code is starting to get confuse and messed up. I found out that in Open Layers 2 ...
1
vote
0answers
41 views

Geocoding search bar input into city with Nominatim and Leaflet

Is it possible to transform a search bar into a geocoder with Nominatim and Leaflet? Using the search bar I would like to search for a city to view weather information and view it on the map. In the ...
1
vote
1answer
38 views

How can filter low cloud coverange in a region with Sentinel-2 L2A in GEE?

I'm trying to filter clouds in Sentinel-2 through GEE in a ROI but I get the same number of images clipping or not clipping the geometry. How can I calculate the cloud coverage in a ROI and filter an ...
1
vote
0answers
33 views

How to find the image ID participating in the mosaicing in Google Earth Engine

I want to find the image ID participating in the mosaicing, here is my mosaic process. Just the partial images appearing in the mosaicing result, not all those meet the filter conditions. The color ...
0
votes
0answers
15 views

How to Create dojox.form.CheckedMultiSelect dropdown?

I'm trying to create a drop down multi select checkbox using dojo JS and html but just given the drop down only. Code: <body> <div> <select data-dojo-type="dojox/form/...
0
votes
1answer
15 views

ArcGIS JS API - Masking a Layer - Changing the tilelayer source?

I am trying to reproduce and modify the mask effect found in this example from the ArcGIS JS API: Masking effect using a custom layer view There is a lot of fancy footwork to modify the underlying ...
1
vote
0answers
24 views

Create Time Series Chart of NDVI (based on Landsat 5) of a National Park in Germany with Google Earth Engine

So this is my code so far: My Questions: How do I name the title and x-axis and y-axis? It isn´t working with .setOptions({title: 'NDVI Bayrischer Wald Landsat 5 1984 - 2013'}) unfortunately. How do ...
1
vote
0answers
31 views

Why does layerView as returned by view.whenLayerView not have a watch method in it?

It seems to me that the layerView variable used as in this line: view.whenLayerView(layer).then((layerView) => { does not have the watch property so the zooming-to-Romania functionality does not ...
3
votes
1answer
94 views

Google Earth Engine: Javascript API vs. Python API

Google Earth Engine seems to be most commonly used through either the Python API, or the Javascript API on the browser. Trying to decide for one, I have come across this comparison, from a Tyler ...
1
vote
0answers
25 views

Adding a table to a web map made in Folium [closed]

I have made a nice Folium map however, the amount of data is small, but increasing. Right now it is grabbing a wildfire perimeter GeoJSON from NIFC and then getting points from my organization and ...
0
votes
0answers
19 views

Temporally grouped reduction in Earth Engine: confusing behavior

I am trying to create two Image Collections in Earth Engine, each representing monthly composites of Sentinel 1 observations in my ROI. The first contains VV images, the second contains VH images. I'...
0
votes
0answers
17 views

Doing average for image collections changed spatial resolution in GEE

I tried to calculate the averaged map for a satellite product in a month using GEE, but after I exported the result, I found the spatial resolution was changed into 1 lat/lon deg, and the native ...
0
votes
1answer
19 views

How to create an interactive based filter (checkboxes) with multiple layers using Carto VL

I'm relatively new to coding, and have been developing a map using Carto VL and Mapbox. I've found a way to create a filter within a map where users can turn off and on different categories within ...
1
vote
1answer
32 views

Add an incremential number to each feature in a FeatureCollection in GEE

Bit stuck at the moment on this. I need to add an incremental number (1:total length) to each feature in a FeatureCollection in Google Earth Engine. So consider for instance the GAUL dataset as ...
-1
votes
1answer
36 views

Handle large point layer on client side using Leaflet/OpenLayers [closed]

I'm planning to write an web app which will display large amount of point features (approx. 120 000 features, 50mb after data cleanup). Each point will consist of only two values - coordinates and ...
0
votes
0answers
65 views

Looping FeatureCollection and ImageCollection in Google Earth Engine editor

I have an image collection and feature collection. In my image collection, I have filtered the dates and a specific band by this: ''' var imagecollectionL8 = ee.ImageCollection("MODIS/006/MOD11A1&...
0
votes
0answers
16 views

Reduce the height of the selected cesium entity to zero on mouse click in cesium

How do i need to reduce the height of the selected entity to zero on mouse click in cesium. Below is the code which i had tried var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas); ...
0
votes
0answers
19 views

Adding DWG files to Cesium Globe

I have .dwg files which are not georeferenced. Is there any way to add those to Cesium Globe and extrude?
0
votes
0answers
46 views

Create GeoJSON layer based on remote server request (ArcGIS JS API)

I'm starting with ArcGIS JS API. I'm doing the following POST request to my remote server: esriRequest("php/load_gisdata.php", { method: "post", query: { table: &...
0
votes
1answer
33 views

Coded value domains are not showing in pop-up in JavaScript API webapp

I have a web app that was built with JavaScript API 4.10. One of my layers is a map image layer that includes many sub-layers with some fields that have domains. The issue is that in the pop-up only ...
0
votes
1answer
27 views

How to use feature collection after esri leaflet query.run()?

35 years coding but new to GIS leaflet and Esri.leaflet. Javascript I can do but it is not one my long term primary languages. I am trying to make a query result available for processing after some ...
0
votes
0answers
21 views

CesiumJS:3Dtiles tileset path? (Windows)

I'm trying to load and display my 3D tiles file with CesiumJS on my Window Station and Chrome web browser. Cesium server seems to running fine locally. When I type the 'npm start` command via one ...
1
vote
0answers
28 views

How to add image in OSM with the authorisation key using OpenLayers

I am trying to get a layer from the WMS request but the problem is the URL expects the authorization header. I have tried implementing that I am getting the error. Failed to execute 'createObjectURL' ...
2
votes
1answer
78 views

Understanding tileScale in Earth Engine

In many Earth Engine functions such as Image.reduceRegions or Image.sample, there is an argument called tileScale. The API documentation generally interprets it as: A scaling factor used to reduce ...
1
vote
1answer
24 views

Google Earth Engine Map Layer Incorrect Position

Having read the Google Earth Engine guide 'NDVI, Mapping a Function over a Collection, Quality Mosaicking' (https://developers.google.com/earth-engine/tutorials/tutorial_api_06) I am trying to compute ...
1
vote
0answers
26 views

Filtering pins from arrays with checkboxes and general cleanup

I am new JavaScript but I am looking for a way to use checkboxes to turn on and off sets of pins. The problem I am having is that I want to find the intersection of two arrays and pull the ...
1
vote
0answers
33 views

Get daily mean of AOD from MCD19A2 in GEE

I tried to get daily mean of AOD from MCD19A2 in GEE, but my mean function always returns zero. // function to add date to image collection from system:time_start var writeDate = function(image){ ...
0
votes
1answer
29 views

Generate a JSON instead of an image for the legend with OpenLayers

I'm not clear on how I can pass the params to getLegendUrl. My aim is to obtain the JSON and for this scope I use the code below: var graphicUrl = wmsSource.getLegendUrl( resolution, 'params'...
0
votes
1answer
61 views

Is there a way to make FeatureGroup or LayerGroup un-clickable in Leaflet?

I have a FeatureGroup that serves as a container for imageOverlays. Normally a popup opens when one of the image overlays is clicked. Now at some times I don't want this to happen, and I can't figure ...
0
votes
1answer
32 views

ArcGIS JS API - time series with heatmap

I am trying to create a time series of covid data moving across the globe. For now, I'm trying to use a heatmap to do it. Using this COVID19_Time_Series_Combined (which pulls data from here), I ...

1
2 3 4 5
60