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

British National Grid to OS Grid Ref converter in JavaScript

I am looking for a British National Grid to OS Grid Ref converter in JavaScript. I've looked everywhere but can't find anything. Are there any JavaScript or open source libraries about that do this ...
Hairy's user avatar
  • 4,821
0 votes
1 answer
34 views

Display route layer between current user location and geocoded search locaton in Leaflet?

I would like to create a simple Leaflet app that zooms to the user location, and also to a location defined within the geocode search bar. Secondly, the app should show the shortest route between the ...
Samuel Gachuhi's user avatar
0 votes
0 answers
31 views

3D modelling with DEMs and ThreeJS

I am trying and right now in the search of methods to visualize 3D terrain with the use of the JS framework "ThreeJS" and so far I have only got through to visualizing with the QGIS2threeJS ...
DilankaMunasinghe's user avatar
1 vote
1 answer
53 views

Filtering clouds and creating median with Google Earth Engine Landsat8 EVI Composite

I am downloading images from Google Earth Engine's Landsat 8 Collection 1 Tier 1 8-Day EVI Composite collection here. I would like to create one image, a median composite of the images from May 1st to ...
Lavendarfire's user avatar
0 votes
0 answers
27 views

Deck GL set MVT point layer icon faces camera

I'm attempting to set the MVT layer icon to faces camera in Deck GL (version 8.8). Currently, I use first person view and MVT layers. The problem is that currently the points faces up. I would like ...
zsoooc's user avatar
  • 339
0 votes
0 answers
23 views

Tippecanoe | Can't set max zoom extent level 22 for mbtiles

I know this might be a duplicate question but I wasn't able to find any solution. I'm working on a tool with the help of this package which is actually a platform to convert a geojson file to mbtiles ...
msc's user avatar
  • 1
0 votes
1 answer
29 views

How to annotate features in google earth engine?

I have a CSV file with ID, X, Y, NAME and ZoomLabel. I have been successful with putting the Point Feature on the map. Now I am trying to annotate the locations with the NAME field. I used the ...
Sakshi Sarang's user avatar
0 votes
0 answers
38 views

Create custom layout with OpenLayers

As a side project, I am learning to work with OpenLayers and I am trying to replicate the layout that is shown in these type of maps (see attached image) I have started to play with the JS following ...
GCGM's user avatar
  • 1,118
0 votes
0 answers
51 views

Error while creating Worker Pools in GeoTIFF

I have to extract rasters from a large TIFF file (about 8MB). For this purpose I use GeoTIFF v.2.0.7 readRasters, but performance is unsatisfying: reading rasters took: 395143.48280000035 ms As a ...
Michał Dubrowski's user avatar
1 vote
1 answer
62 views

Initial zoom to GeoJSON object from file (.js) in Leaflet

I am building a viewer with Leaflet API and OpenStreetMap base. I want that when I enter this viewer it shows me immediately in the initial visualization the extension of my layer that I am using. For ...
MrShaggy87's user avatar
0 votes
1 answer
29 views

Image Collection containing orbits not related to the defined boundary

I tried to download all the images in ImageCollection for methane emission (in a specific timeframe and for a defined location)and check their orbits. Even though I've added filterBounds, there are ...
Parisa Masnadi's user avatar
0 votes
0 answers
44 views

Style in OpenLayers shows invalid characters on some computers

I have a layer in OpenLayers, which I style for font color. However, on some computers, the texts show with special characters, a blurred, confusing text that cannot be read. In others, without any ...
user12538529's user avatar
0 votes
1 answer
39 views

Unable to export time series from MODIS NDVI in GEE as transforming geometry into requested projection not working

I am trying to acquire MODIS NDVI (MOD13Q1 v061) time series using Google Earth Engine for certain locations for which I have the coordinates. My code looks as follows: ////////// Input // Specify ...
Toni's user avatar
  • 3
0 votes
1 answer
68 views

JavaScript libraries to visualize CityJSON data

I am looking for JavaScript libraries that allow you to visualise cityJSON (https://www.cityjson.org/) data. I am currently using cityGML with Cesium JS (https://cesium.com/platform/cesiumjs/), but ...
Yoya01's user avatar
  • 39
1 vote
0 answers
53 views

How do display WMS on demand directly from a webgis app

I’m making a webGIS app based on Cesium Js. I have a node js server for all the server logic, a tomcat server hosting Geoserver to be able to load WMS layer on Cesium. On my app I want to allow the ...
Nicolas Guibal's user avatar
1 vote
1 answer
44 views

Browser hangs while parsing georaster in geoblaze

I've been trying to create a histogram using geoblaze with a COG from s3. The georaster is as follows: (generated with geoblaze.parse(url)) { _data: '==hidden==', projection: 32618, height: ...
Snape's user avatar
  • 11
0 votes
1 answer
125 views

.getImage() generates error in geotiff.js

i am using geotiff.js lib to perform some processing on tiff files. referring to the official doc of the aforementioned lib here https://github.com/geotiffjs/geotiff.js you can see in section Example ...
Amrmsmb's user avatar
  • 305
1 vote
2 answers
362 views

Converting shapefiles from S3 to GeoJSON in JavaScript for web map

I am working on a web map using OpenLayers and have encountered a challenge in converting shapefiles stored in an S3 bucket to GeoJSON using JavaScript. My goal is to display the converted shapefiles ...
JNN's user avatar
  • 125
0 votes
1 answer
63 views

Create KML file from Metro Dreamin map

I am wondering if there is an easy way to create a KML file from a Metrodreamin.com map; perhaps from a JSON file. Ideally I would like to do this from an Ipad. However I have acess to a Windows ...
David Martin's user avatar
0 votes
1 answer
622 views

TypeError: a.union is not a function

I'm trying to get the union of two polygons but every time I try I get a TypeError: a.union is not a function error. Here's my code: import GeoJSONReader from 'jsts/org/locationtech/jts/io/...
neubert's user avatar
  • 360
0 votes
0 answers
30 views

How to add addtional spatial data to 'qgis2threejs' programatically?

Is there a way to add additional data to the 3D model which exported from the 'qgis2threejs ' module? For example, if I create lines (with X, Y, Z(height) coords) in PostGIS could I load it into the ...
BHadh's user avatar
  • 79
1 vote
1 answer
124 views

geotiff.js - Elevation at point in DEM raster seems to be null or zero

When reading COG (Cloud Optimized GeoTIFF) or original GeoTIFF of a DEM/DTM (elevation map) file using Geotiff.js directly or geoblaze, elevation at a point through conversion of coordinates to pixels,...
Michael Jernil's user avatar
1 vote
1 answer
78 views

Google Earth Engine ui.Chart.getDataTable() returns empty list

I am trying to grab the underlying data from a chart in GEE. It looks like there is a built in method for this: ui.Chart.getDataTable(), however it appears to not work. I've tried on multiple charts. ...
yeet_man's user avatar
0 votes
2 answers
70 views

OpenLayers 7 WFS 1.1.0 not drawing polygons when srsName contains opengis.net/gml/srs/epsg.xml

I'm writing a web app that uses WFS data on top of OpenLayers with OpenStreetMap. The entire project works in EPSG:2180 projection and uses multiple versions of WFS (depending on server). OL doesn't ...
T3chnoM4ciej's user avatar
0 votes
0 answers
212 views

How to cycle through features of a given google.map.data layer

I'm building a Google map UI, where a user can select a state which will zoom them into counties which will zoom them into zip codes. This is not homework. It's a legitimate requirement for a client. ...
arcee123's user avatar
  • 389
0 votes
1 answer
713 views

Converting lat/long coordinates to UTM using JavaScript - wrong easting

I am trying to convert these coordinates to UTM const longitude = 143.5279742; const latitude = 44.062027; // Calculate the UTM coordinates const zoneNumber = Math.floor((longitude + 180) / 6) + 1; ...
hbk's user avatar
  • 434
1 vote
1 answer
432 views

How to get attributes of Web Map feature which user clicked on in custom widget in ArcGIS Experience Builder application?

I have an ArcGIS Experience Builder application, which uses a Web Map I host in ArcGIS online. This Web Map contains a feature layer with several attributes, and I can use these in Experience Builder ...
work2023's user avatar
4 votes
1 answer
198 views

Populating Google Maps using QGIS exported GeoJSON

I am populating a Google map using GeoJSON that I'm exporting with QGIS. I'm converting the TIGER shapefiles into GeoJSON for state polygons. I used the standard output, and received the file. My ...
arcee123's user avatar
  • 389
1 vote
0 answers
146 views

Extracting elements plotted on OpenStreetMap canvas

I found a very nice website with eclipse maps, which example can be found here: http://ytliu.epizy.com/eclipse/solar_eclipse_interactiveMap.html?ybeg=2001&ind=55&dT=69.49500924568443&k2=...
Geographos's user avatar
  • 4,005
0 votes
1 answer
260 views

Pushing Foursquare's Swarm Check-In Data into a Google Maps Service

I've been using FourSquare's Swarm app to track my travels. I'd like to be able to plot the check-in locations on a Google Maps service (or any other web-based service outside of the Swarm App). I've ...
b-rad-b's user avatar
  • 509
0 votes
0 answers
69 views

Calling js module into Google Earth Engine in R (rgee and rgeeExtra) results in 404 error

I want to use BFAST Monitor in Google Earth Engine from within R, using rgee and rgeeExtra. Adapting code from this post to rgee, I have got the following reprex: library(rgee) library(rgeeExtra) ...
madmat's user avatar
  • 1
0 votes
1 answer
127 views

How to move and rotate WMS layers independently using OpenLayers (without GeoServer)

There are maps on OpenLayers 6 and proj4js that manages WMS layers in different projections. Sometimes (e.g. for plan maps) the overlay is not aligned with base layer and a need a function that can ...
neadmin's user avatar
0 votes
0 answers
18 views

JavaScript implementation of OGC GeoSPARQL functions

I am aware of various Java implementations of OGC GeoSPARQL standard, provided by RDF4J, Jena, GraphDB and other vendors. Now I am looking for JavaScript libraries that implement whole set of ...
RedCrusaderJr's user avatar
0 votes
1 answer
238 views

MODIS LST time series for daily average

I am trying to compute and plot the linear regression model for MODIS terra LST values. I have successfully plotted the "LST_Day_1km" band by using the following code: var terraD = ee....
Ali Turab Hani's user avatar
1 vote
1 answer
142 views

Leaflet shapefile plugin doesn't show the shapefile layer

I'm trying to use the Leaflet Shapefile plugin (https://github.com/calvinmetcalf/leaflet.shapefile). A demo page also shows the plugin's output (http://calvinmetcalf.github.io/leaflet.shapefile/). I ...
Melanie's user avatar
  • 159
0 votes
0 answers
231 views

deck.gl: regenerating all layers every time

There are MVTLayer and GeoJsonLayer on the map. The first one is background. The second one should request features for current map extent only (i.e. bounding box strategy). Code: const map = new Deck(...
Vladimir F's user avatar
0 votes
1 answer
192 views

Reg Google Earth Engine code editor suggestion tooltip

When I try to create or copy geometries in GEE editor, I am not getting suggestion tooltip to convert geometries into import records. Its working for my other Gmail account. Having issue with other ...
Santu Ganiger's user avatar
0 votes
0 answers
57 views

Polygon will not display in angular / JavaScript layer

I have allowed the user to draw a polygon and save the points to Firestore. When the page loads, Firebase retrieves the polygon coordinates relevant to a location. When I create the polygon rings ...
Karl Ennis's user avatar
1 vote
1 answer
78 views

Why can I add data as a map layer, but not be able to export it in GEE?

I have put together a script in earth engine with the purpose of producing an NDVI max time-series collection with relevant masks applied from 1984-2022, then reducing this using Kendall's correlation ...
Jack S Marchant's user avatar
0 votes
1 answer
48 views

How to calculate the burnt area for each rectangle in the grids specified and save in CSV

I am new to the Google Earth Engine. I am trying to calculate the burnt area for this gridded region (dividing the region into 24 x 24 grids), and save the area in a CSV file. But I am unable to get ...
Abdur rasheed's user avatar
1 vote
1 answer
228 views

Select bounding box Earth Engine

I am trying to select a particular region (square) on map of ERA5 dataset but ee.Geometry.BBox instead add the layer on the whole map instead of that squared region. I have region coordinates inside ...
pwnkit's user avatar
  • 17
1 vote
1 answer
62 views

WMS XML file does not have "contents" tag

I'm trying to use WMSLayer (https://developers.arcgis.com/javascript/3/jsapi/wmslayer-amd.html) to create a layer from a WMS file. However, the class makes a call to https://www.geoservicos.ide.df.gov....
Marco Antônio de Lima Costa's user avatar
1 vote
1 answer
228 views

Convert HMTL Maps to GeoJSON/JSON data

I have an HTML file here, but I don't know how to extract the coordinate data into a GeoJSON or shapefile. Is there a quick way to get it? Link : https://codeshare.io/DZEwnO ... function myMap() { ....
Asolole1123's user avatar
0 votes
0 answers
129 views

Wikipedia layer in Leaflet

I have been trying to move examples of Wikipedia layers to my file server. They work when opened via file explorer, but not when uploaded. All that I have changed are the addresses for the JS files. I ...
WombatBill's user avatar
0 votes
0 answers
434 views

Infowindow on Google Maps map is not showing

When I add an infowindow it's not showing also the rectangle anymore. let map; function initMap() { // The location of Uluru const uluru = { lat: 32.1582615544072, lng: 34.89155037133181 }; ...
BenBen Shmil's user avatar
0 votes
0 answers
138 views

Plot reference lat/lon lines in Leaflet

Basically taking the code from the sample provided by the leaflet website, I am able to get the general map for leaflet: Now, I would like to add reference lat/lon lines. For example, 0, 10, 20, ... ...
Miss_Orchid's user avatar
1 vote
1 answer
133 views

JavaScript ArcGIS: Relative links are not working

I want to show a link in popup template when clicking on a feature. I am using popup template: const template = { // autocasts as new PopupTemplate() title: "Trail run", content: "...
KlemenPl's user avatar
  • 129
0 votes
1 answer
120 views

Removing popup programmatically does not work in MapLibre JS

Removing programmatically a popup does not work. Popup created OK, as: map.on('click', function(e) {new maplibregl.Popup().setLngLat(e.lngLat).setHTML('MODIFICATIONS').addTo(map);}); Deleting ...
Angile's user avatar
  • 1
1 vote
1 answer
684 views

Leaflet.draw change polygon filling programmatically

I'm using Leaflet.draw to draw and edit polygons. var drawControl = new L.Control.Draw({ edit: { featureGroup: drawnItems, edit: { selectedPathOptions: { ...
LAffair's user avatar
  • 255
3 votes
1 answer
403 views

Detect if features are next to each other but not overlapping using Turf.js

I would like to detect if two features are only sharing one or more edges but do not overlap using Turf.js. What I have tried so far is using all the relevant boolean functions of turf. Unfortunately ...
burrrt's user avatar
  • 2,296

1
2 3 4 5
68