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

learn more… | top users | synonyms (1)

1
vote
2answers
42 views

Is there an editor for Leaflet JavaScript that has intellisense functionality?

Is there an editor for Leaflet JavaScript that has intellisense functionality? I've tried both Visual Studio 2015 and Visual Studio Code ... in 2015, if I type code like var geojsonlayer = L and ...
0
votes
0answers
45 views

OpenLayers Control.SelectFeature makes marker click listeners stop working?

I'm been having some trouble with OpenLayers. I have a map with several markers being added dynamically to a marker layer called markerLayer. Each marker has a click listener that opens a popup window ...
1
vote
0answers
8 views

ol.interaction.DragBox - aspect ratio

I want to be able to select a rectangular area of the map, but the selection must have a fixed aspect ratio. Let's assume 2:1 like this: I haven't found any ol.interaction.DragBox option to do this. ...
3
votes
1answer
44 views

How to Pass geojson array to datatable dyanamically using javascript

I want to pass one geojson file to dynamically created datatable using javascript,I am unable to identify column names in file.. I have tried this.. <body> <table id="example" class="...
0
votes
1answer
73 views

How to load 2 different WFS layers using OpenLayers?

I've been trying to load 2 WFS layers with the 3857 projection and I'm only able to load one of them, a line vector layer, while the other (point vector) doesn't load at all. Later I'm going to want ...
0
votes
1answer
2k views

Not showing multiple markers on OpenLayers

I want to show multiple markers on my Google map with OpenLayers. Below is my code : for (var pointcount = 0; pointcount < jsonObj.length; pointcount++) { if (jsonObj[pointcount].Long != null &...
1
vote
1answer
479 views

Why do I have to reload the page, to show the Map correctly?

I added a map, in the way I'm supposed to, but why do I have to reload/refresh the page, to get the map (almost) as I want to? This is, what I mean: Map before reloading the page: Map after ...
2
votes
1answer
24k views

Uncaught SyntaxError: Unexpected token : when using ajax

I try to call json data from geoserver, but when i try to run it in chrome, it return this following error "Uncaught SyntaxError: Unexpected token :" This is my code, function initialize(){...
1
vote
1answer
244 views

ArcGIS JavaScript Web Application: Workflow for Tokens?

This may appear to be a duplicate but I can't find any online source which is able to help me. Essentially, I want to protect a web Service from unauthorized access but still need to allow a web ...
6
votes
1answer
535 views

Why do ArcGIS Desktop 10 HTML popups give JavaScript/HTML Error?

Using ArcMap 10 Desktop HTML Popups. The issue I am having is that the html < select > elements aren't working - you can select it and use the arrow keys to navigate through(up/down) the list but ...
2
votes
1answer
170 views

Node JS and Tilestrata to serve SRTM Tiles

I emailed one of the authors and it turns out that tilestrata-disk wasn't meant to be used as a "provider" in their system. No wonder! Here's what Brian Reavis said about how the cache works: A ...
-1
votes
1answer
289 views

How to filter polygons in Leaflet using range slider

I have a map I'm working on with Leaflet that displays a choropleth of zip code-level data. One piece of functionality I would like to add is to allow users to use a range slider to filter out ...
1
vote
1answer
765 views

Google Hybrid Map tiles won't load in OpenLayers when centered on certain position

Since the Google Maps API update to V3.2 (17 Feb 2015) our maps have not been loading to their initial state, centered over the Gulf of Mexico. When the center location is: center: new OpenLayers....
0
votes
2answers
225 views

Set a new SLD style in openlayers 3 for WMS request

I im triyng to submit a SLD style in openlayers 3 to change the color of my WMS(geoserver) But nothing is working...Anybody have a idea? Here is my code: var wms_p_popf = new ol.layer.Tile({ ...
2
votes
6answers
5k views

Event listeners after each plotting of a point of a Polygon Vector in OpenLayers

I am quite new to OpenLayers. I have a polygonLayer for users to draw polygon vectors. The plotting feature is working fine. polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); map....
1
vote
1answer
38 views

Leaflet javascript in popup

Can JavaScript be included in a leaflet popup? We have modified this example To this :- var this_marker = L.marker([51.5, -0.09]).addTo(mymap).bindPopup( '<div style="color: red">Hello<...
0
votes
0answers
185 views

How to customize heatmap color on pre decided constraint values?

I am working on heatmap and situation is i have to change the color of heat map marker on the basis of some constraints and the color should change according to those basic constraints values. My ...
1
vote
1answer
48 views

Editing WFS from GeoServer using OpenLayers

After reading a very good tutorial on how to edit WFS with OpenLayers, I've tried replicating it but with my own WFS layer from Geoserver. I managed to load the WFS and my basemap successfully and ...
1
vote
1answer
21 views

Marker points don't fit with street (lack of accuracy while zoom)

I'm using open layers 3.x with google maps layer (cannot give you link, search "ol3 google maps layer"). I can't enhance the accuracy how points would be represented on map, see images below: This ...
-3
votes
0answers
19 views

div 'map' in 3 part [duplicate]

I wanted to split the div 'map' of 3, part contains the map, another the legend and 3rd layers with leaflet image
2
votes
2answers
3k views

Increasing OpenLayers Max Zoom Level

I develop HTML pages by using OpenLayers, which pointing to a local GeoServer WMS service. On displaying a layer, it stops at its available max zoom level, but it is still too small to manipulate (a ...
0
votes
0answers
20 views

Taking Lat and Long data collected with Geolocation API and using it with ArcGIS Network Analyst?

I am creating a routing map that will eventually be hosted on ArcGIS online.(I am using JavaScript) Currently, I have figured out how to find someone's current location using the Geolocation API and ...
0
votes
1answer
2k views

toggle visibility of a Layer in Openlayers 3(!) with a Checkbox

I have some vector layers on top of a tiled layer and a checkbox for each vector layer. I want a layer to be visible if its checkbox is checked and vanish if it gets unchecked. I tried to call a ...
0
votes
0answers
23 views

Adding zoom capability to ESRI Story Map Map Tour

I'm building a Map Tour using ESRI's downloadable/configurable version. If you're unfamiliar with the layout, you have the option to sort through your map points using either a scroll bar along the ...
3
votes
2answers
4k views

How to Use Custom Basemaps with BasemapToggle widget?

I'm trying to upgrade my app from version 3.3 to version 3.7 of the JavaScript API and am switching out the basemap gallery for the new BasemapToggle widget. I have two custom basemaps that I want to ...
0
votes
1answer
14 views

Pop up for features inside a GeoJson File

I uploaded a GeoJson file into GMaps API that has many polygon features in it, and now I'd like to create a pop up for each polygon. The content will be obtained from the attribute table of the ...
3
votes
1answer
75 views

Leaflet printing does not show pins and map is shifted

I don't exactly why but whenever I try to print my leaflet map with layers, it shows the map a little shifted to the left as well as the pins are not quite ok. I tried using easyPrint() and window....
18
votes
4answers
29k views

How to load external GeoJSON file into Leaflet map

I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an ...
0
votes
1answer
27 views

Cannot get L.control.coordinate to work properly

I am trying to make a map modal with Leaflets that displays the lat./lng. coordinates in a box when the user clicks on the desired point. I got the popup given in the Leaflets tutorial to work fine ...
1
vote
1answer
248 views

A problem with event firing upon mouseout

I'm trying to create a point map that displays information about a point in an info box upon user mouseover and changes the styling of the point. On mouseout, I want the info box and marker styling to ...
1
vote
1answer
49 views

Saving Edits on a WFS layer by using OpenLayers

So with an app that I've produced by taking this into account, I've managed to create a web map with editing function using a WFS layer from Geoserver. Problem is that, unlike in the working example, ...
1
vote
1answer
3k views

Keep marker constant on Google Maps Javascript

I want to be able to keep a marker constantly in the center of Google Maps on my mobile application. I have tried using bindTo functionality of Google Maps, which binds the marker to the center of ...
5
votes
1answer
2k views

How can I select a feature in Openlayers 3 by right click it?

I'm trying to selete / delete a feature by right click it on Openlayers 3. I know I have map events singleclick/click/dblclick and I also know I can use the ol.interaction.Select for delete. In ...
0
votes
2answers
22 views

Leaflet: Change displayed column on click

I have a GeoJSON layer in a Leaflet map showing buildings. The columns of the buildings layer contain electricity usage info by date (eg., the column 12052015 contains electricity usage on Dec 5, 2015)...
0
votes
0answers
12 views

How to retrieve geodetic coordinates from a geotiff in Javascript?

I believe I have successfully calculated UV space coordinates by following this formula: var size = [image.getHeight(), image.getWidth()]; var xScale = directory....
10
votes
5answers
2k views

what is the right way to delete all features from featureLayer

I have a featureLayer and I don't want to kill it and create another one. I want to delete all features from the current featureLayer. I found that I can use applyEdits method but in order to use it I ...
0
votes
1answer
43 views

Using WFS from Geoserver in OpenLayers

There are quite a few questions regarding the subject but the fact that these have so many views makes me think it's a much more complex subject that requires more attention. I've been through the ...
0
votes
0answers
9 views

Loading TIN files in Javascript and converting to OBJ file

I am absolutely new to GIS/TIN files. I have to load a "Triangulated Irregular Network (TIN) file and render it. I am looking for javascript libraries that can load the file and convert it to .OBJ ...
0
votes
3answers
52 views

Split string of coordinates and put it in array

After doing the funtion: cirkelFeatures[1].getCoordinates().toString() I'am receiving the coordinates of the polygon (they are in epsg 31370) "140015.12392378994,147993.86462185346,146949.24235978903,...
0
votes
1answer
11 views

How to put image on top of OpenLayers 3 map by pixels

I need to put image which should be in middle top of openlayers 3 map. So, it should be defined with map canvas and pixels. Is that possible to do? This is my code: var arrow = new ol.layer.Image({ ...
1
vote
0answers
41 views

Lag openlayer map when I add two layers

I'm writing a directive that controls openlayer3 map. The problem arises when I want to add two layers. For example KML layer and geojson layer. Map then does not work smoothly. You can only zoom but ...
1
vote
1answer
194 views

Mapbox Directions Plugin - Get Route GeoJson

Goal: find the GeoJSON points in a web map that are closest to a directions route using turf.js. I am using the Mapbox Directions plugin. I am following this example. How do I work with the route ...
1
vote
1answer
1k views

How can I dynamically restrict pan extents on an image layer in OpenLayers 3?

I have been sandboxing with OpenLayers 3 and thus far have been happy with the results. I have used answers on this site to restrict my most zoomed out level from panning and to restrict the range of ...
0
votes
0answers
27 views

How To Get Results From Javascript / Google Maps API 3

First of all, I am desperate! My application that was working fine for years using Google Maps API 2 has failed. Evidently Google has stopped supporting it or changed something. My clients are not ...
0
votes
1answer
13 views

javascript .match to check for right coordinate format

I am using javascript .match to check and correct right coordinate format after user writes it in textbox. Working example: input: lat=57.000000, long=24.000000 code: match(/(\d{2}).(\d{4,9})/gi) ...
0
votes
1answer
20 views

Loading a stateGeoJSON across countries

I am trying to build a chloropleth map in Javascript with zoom functionality. Map will need to have a chloropleth layer of all countries. On zooming in it will need to show a chloropleth of the next ...
1
vote
1answer
354 views

problem with popup conclusion on pressing a marker

I have markers on pressing to which popup has to be brought. how to make it? (coordinates of markers undertake from a DB) var map; var markers; function ejecutar() { init(3); //loadMarkers()...
1
vote
0answers
28 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 ...
2
votes
1answer
20 views

AttributeTable sending an alert that data was not found when clicking on table row

I have an AttributeTable that I have opening when I start a widget. When I click on a table row in this instance, I am able to get the information back correctly and not see this message. I did this ...