Questions tagged [javascript]

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

733 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
1 answer
919 views

Math formula to calculate GPS location for weighted GPS data points

I'm working to improve the location and accuracy of a map / data-point driven application. I have a collection of locations of interest. Each location of interest has a collection of data points that ...
Dan's user avatar
  • 161
6 votes
0 answers
1k views

Trilateration with error account or lack of precision

I am developing a node.js/javascript application where I would have dozens of beacons in a row (positions known), which gives me their distances to specific object (3 or 4 distances per object). The ...
chemabuss's user avatar
6 votes
1 answer
2k views

Finding Intersection of Two Circle given Lat/Lon and radius?

I am attempting to calculate the intersection of two circle on the Earth with a given latitude, longitude and radius. I started with this Calculating intersection of two Circles? These circles will ...
Ryan crosser's user avatar
5 votes
0 answers
755 views

OpenLayers: Performance on satellite hybrid map (raster tiles, vector tiles, vector labels)

I've got a map with three kinds of layers, each of which serving a somewhat different function: TileLayer: raster tiled map from an XYZ source (as .png) to show photographs in the background ...
Moehrengulasch's user avatar
5 votes
0 answers
283 views

Fixing buildings that do not appear in 3D using Mapbox gl js?

I'm trying to adopt this Display buildings in 3D example, but I found out that in my city (Minsk, Belarus) some buildings look flat like this: The coordinates of this particular building are 27....
Anton's user avatar
  • 151
5 votes
0 answers
404 views

proj4js gives wrong result for EPSG:3375

Faced with very strange issue. Trying to do coordinate transformation from EPSG:4326 to EPSG:3375 using proj4js and getting wrong result. This is my code: var epsg4326 = '+proj=longlat +datum=WGS84 +...
Sergey Markin's user avatar
5 votes
0 answers
2k views

leaflet returns wrong {x} {y} tiles from arcgis mapserver

I'm trying to add a leaflet map to an Angular 2 project, which shows a layer from an ESRI mapserver as a tileLayer. As such: ngOnInit(): void { let map = L.map('map', { crs: L.CRS....
Ast's user avatar
  • 51
5 votes
1 answer
1k views

how to disable duplicate items in the legend for ArcGIS JavaScript API

I have a problem with duplicate items in the legend panel! Can anyone help me? This is my feature Layer with popup info: // Feature Layer var msFeatureLayer = new esri.layers.FeatureLayer("...
roybaer's user avatar
  • 51
4 votes
2 answers
845 views

Decode Google Polylines in JS

I am a complete novice at coding and am trying to return a decoded polyline in array of (lat;lng) from an encoded polyline string. I found a similar post here Converting encoded polylines into GeoJSON ...
Raymond Woodley's user avatar
4 votes
0 answers
241 views

Chart multiple regions on one histogram

I'm having trouble trying to chart multiple regions onto one histogram. var urban1 = urban.first().geometry(); var pine_forest1 = pine_forest.first().geometry(); var regions = ee.FeatureCollection([ ...
M Johnson's user avatar
4 votes
0 answers
3k 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 ...
DMack's user avatar
  • 655
4 votes
0 answers
210 views

Access SharePoint data via ArcGIS Web AppBuilder Custom Widget

I need to read and write data from/to SharePoint site via ArcGIS Web AppBuilder Custom Widget. Does anybody any experiences how to do it? I tried SharePoint REST API and putting a code from this ...
soldous's user avatar
  • 51
4 votes
0 answers
858 views

Access Elements in SVG with Openlayers 3 using forEachFeatureAtPixel()

I am trying to access elements (id, style) of a SVG image in Openlayers 3. I tried to link different examples, but the problem is that displaying a SVG is only possible with ImageStatic() and the SVG ...
clax's user avatar
  • 183
4 votes
0 answers
2k views

How to convert WKT to SVG

I have some Well-known text (WKT) for representing geometry object such as Point, MultiPoint, LineString, Polygon, MultiPolygon etc. I have a multipolygon with in total 40000 Points. I have found ...
Jetson John's user avatar
4 votes
1 answer
1k views

How to offset/displace overlapping lines in a web map?

I have a dataset of points representing a To/From status - something like distribution centres and delivery addresses. When the user clicks on a point I'd like to show the relationships between this ...
Stephen Lead's user avatar
  • 21.1k
3 votes
1 answer
663 views

Image collection monthly averages using geemap package

I am trying to convert some code snippets from GEE JavaScript to Python. This code computes the monthly averages of NDVI images given a range of years and a range of months. This is my code in ...
Rim Sleimi's user avatar
3 votes
0 answers
369 views

GetFeatureInfo of a specific GeoServer layer by selecting it from a set of GeoServer layergroup

I have multiple Geoserver layers, suppose 2 here (Rainfall and Maximum Temperature) and I want to extract the feature of that layer which I check/switch in the sidebar, But for now I just get the ...
Abhilash Singh Chauhan's user avatar
3 votes
0 answers
314 views

OpenLayers origin at top left of map

I have an OpenLayers map which uses an ImageLayer as the base layer and I want to create a custom projection so that (0, 0) is at the top left of the image rather than the bottom left. I tried setting ...
sarahtwomey's user avatar
3 votes
0 answers
181 views

Measure distance to coast along river

I have a dataset on rivers and a dataset on the location of dams. I want to calculate the distance from the dams to the river’s mouth at the coast along the river (not the shortest distance) for those ...
Sven Christens's user avatar
3 votes
0 answers
366 views

Displaying QGIS's "Map Tips" in OpenLayers?

Still a little new to QGIS and Openlayers. How would you display QGIS's "Map Tips" into OpenLayers? I am currently using QGIS 2.18 and have the latest update in Openlayers. In QGIS, I have created a ...
NicholasCAMAvision's user avatar
3 votes
2 answers
2k 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 ...
Goran's user avatar
  • 385
3 votes
0 answers
4k views

Watersheds and Catchment delineation in Earth Engine only with included datasets

Is there a possibility to derive Watershed boundaries or catchment areas by using one or more of the integrated data sets in google earth engine? The available data sets are: WWF HydroSHEDS ...
till Kadabra's user avatar
3 votes
0 answers
255 views

Function fires despite conditional query in leaflet-map

In a map built with Leaflet I created a button to export and download data as geoJSON drawn before by the user with Leaflet.draw. To prevent an empty download, I am querying the existence of data. ...
pascatl's user avatar
  • 919
3 votes
0 answers
6k views

Adding points to map with Leaflet using .forEach function

Trying to add an array of points to a map with a Leaflet with .forEach. I thought this should work, but alas, it does not: var jsonData = [ { "LNG":-75.16472099534634, "LAT":40....
user2740509's user avatar
3 votes
0 answers
2k views

Writing code to add calculated image to display in Google Earth Engine?

I wrote a code for Land Surface Temperature (LST) from Landsat 8 images in google earth engine. I have successfully calculated the following steps, NDVI, fractional vegetation (fv), emissivity (EM), ...
Anuruddha Marambe's user avatar
3 votes
0 answers
1k views

Markers with customs angle values

I'm trying to make some markers spinnable using this : target = document.getElementById("mapid"); target.ondragover = function(e){ e.preventDefault(); e.dataTransfer.dropEffect = "move"; }; ...
Nylak's user avatar
  • 143
3 votes
0 answers
4k views

Vector Tiles VS Raster Tiles for leaflet

I have downloaded many vector tiles in the mbtiles format from OpenMapTiles. The reason I did that is because I will be using them on a station that cannot have an internet connection at all. I would ...
LBes's user avatar
  • 163
3 votes
1 answer
2k views

Removing vertex from Polygon geometry in OpenLayers 5

I could able to remove the recent modified vertex of a feature using removePoint method of modify interaction, as well as using deleteCondition event of modify interaction. However, that is not what I ...
Suraj's user avatar
  • 619
3 votes
0 answers
86 views

Get raster data by coordinate

I do have some data from raster files (timelines, 30m) which I would like to access by coordinate from a web interface. E.g. I know the coordinate and need the data from the corresponding raster file. ...
Michael Lessiak's user avatar
3 votes
0 answers
2k views

Mapbox GL checkbox menu

I am trying to toggle layers and legends using a checkbox menu. I'm able to toggle the bathroom and sq ft legends, but I'm not sure how to identify the layer layout in order to toggle it. Here is my ...
tkayne23's user avatar
3 votes
0 answers
455 views

Supercluster and vector tiles

I am trying to take a set of points, use supercluster to create an index, and query that index for vector tiles. Things mostly work as expected, but when the tiles are loaded into Mapbox GL JS they ...
jczaplew's user avatar
  • 1,208
3 votes
0 answers
292 views

Marker click listener jsf2leaf

I am using jsf2leaf library to add a map to a web application using primefaces. The map and the markers(popup message when clicked) are displayed correctly, however I want to display a primefaces ...
DarkSide's user avatar
3 votes
0 answers
603 views

Running python script with HTML and Javascript on Map Tips

I have a problem of running python script by pressing a HTML button on my Map Tips. Right now, this is what I've written for my Map Tips in HTML format. <script> function option1(){ [% ...
lesher's user avatar
  • 31
3 votes
0 answers
2k views

Using Google Maps API to selectively highlight railway routes one at a time?

I am trying to understand the TransitLayer in Google Maps' Javascript API. Utilizing Google's example code, I managed to display a geographically-accurate map of Tokyo Metro, Toei Subway and Yokohama ...
spillthrill's user avatar
3 votes
0 answers
139 views

is there any online WFS gazeteer client which runs on my web browser or exposes http requests?

My question is somehow similar to this other thread, but in my case I want to test a WFS service: Is there a web page where I can test a WMS URL? I look for an online service which lets me add the ...
abu's user avatar
  • 219
3 votes
0 answers
188 views

Attachment editor esri duplicate files

I am using arcgis API's attachment editor var attachmentEditor = new AttachmentEditor({}, dom.byId("content")); attachmentEditor.startup(); featureLayer.on("click", function(evt) { ...
user2955537's user avatar
3 votes
0 answers
515 views

Has API been written for SpatiaLite for Cordova?

I am creating an app in which I will be creating an AutoCAD model for a 3 floor building at my college. I'll be importing this model as a spatial object into my javascript app - then wrap it with ...
Tricode's user avatar
  • 131
3 votes
0 answers
405 views

Validate that Openlayers GeoJSON layer is in the correct format with OpenLayers.Protocol.HTTP call

I am completely new to JavaScript and OpenLayers, I am trying to figure out a way to validate the received layer with the OpenLayers.Protocol.HTTP call. I want to validate that it is in the correct ...
dcuevas's user avatar
  • 31
3 votes
0 answers
323 views

Leaflet Temporal animation of marker clusters

I recently have applied the markercluster leaflet plug-in to my map and I was wondering if something like leaflet.timeline would be compatible with cluster visualization? if not is there any other ...
Diffusion_net's user avatar
3 votes
0 answers
449 views

Increase maximum zoom level for a WebTiledLayer in ArcGIS

I am using the WebTiledLayer from the Javascript ArcGIS API to render a custom WMTS source. The WMTS I am using has zoom levels going from 18 to 21, however I cannot zoom in further than what appears ...
Mathyn's user avatar
  • 205
3 votes
0 answers
244 views

Automatically update the result of a QueryTask

I have developed a application using the ESRI JS API to allow users to create and edit features in a web map. I have used the QueryTask to create summary statistics to report back to the user on ...
BretW's user avatar
  • 479
3 votes
0 answers
744 views

View attachments in popup when using the editor widget

I am using ArcGIS javascript API to construct an editor app for a layer. I am using the default out of the box editor widget to edit and display data for an app. The layers I am editing contain ...
twoLeftFeet's user avatar
3 votes
0 answers
130 views

simple raster format to use in Web applications?

I'm building a Web application in which users create and edit very coarse raster data. They're assigning values to cells in a georeferenced grid. Right now I'm storing the values in a multidimensional ...
Drew Dara-Abrams's user avatar
3 votes
0 answers
542 views

OpenLayers and external CSS

I am using geoExt and OpenLayers to plot some map. Everything worked well until I had to add some styling. To display it on the webpage, I need to use the CSS of my university and once I do that, I ...
Bulkilol's user avatar
  • 283
3 votes
0 answers
2k views

OpenLayers2 and GeoJSON - possible to create, modify and delete features?

I wondered if anyone has some OpenLayers GeoJSON code to read, create, modify and delete features (i.e. instead of using WFS-T)? This is how far I've come - I've no problem changing the pop-up to a ...
user10895's user avatar
3 votes
0 answers
565 views

Format tilelayer.wms URL properties such that I add an overlay iteratively to my base map in Leaflet

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the URL like so: url: "http://localhost:8080/geoserver/sf/wmsservice=WMS&...
Carl Carlson's user avatar
3 votes
0 answers
703 views

Creating a Geodesic Polyline Buffer in OpenLayers

I have a feeling that the answer is going to be 'You can't do that without some very complex coding' but I thought I'd go for it anyway. I recently asked Creating Polyline Buffer in OpenLayers 2?, ...
Rob Quincey's user avatar
  • 1,730
2 votes
0 answers
659 views

Select interaction with openlayers: multi equals true. How to store all layers?

I have a select interaction, with multi option equal to true. This interaction is used with popup, following code https://viglino.github.io/ol-ext/examples/popup/map.popup.feature.html I store the ...
user207825's user avatar
2 votes
1 answer
1k views

Extract coordinates from GeoJSON file in OpenLayers

I'm trying to extract coordinates from a GeoJSON file . I tried this line of code but I didn't have result in the console. <script type="text/javascript"> var vectorLayer = new ol....
Ahmed's user avatar
  • 21
2 votes
0 answers
452 views

Leaflet - adjusting improper y axis between zoom levels

I'm currently data mining a game, and I pulled out the in-game map files (and converted to png). The images are 1024x1024 (pixels). I am currently in the process of learning Leaflet (and gis in ...
Chris Bostwick's user avatar

1
2 3 4 5
15