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
1answer
172 views

Click event doesn't work with with Google Maps

I'm trying to create a simple click event when I click on a list item on my page, a marker should be created on the google map in that page. But it does not happen. Is there some google maps API ...
0
votes
0answers
3 views

How to add custom CSS class to leaflet tilelayer

I am working with mapbox.js and leaflet to create a map with a number of overlapping tilelayers. I want to apply some custom CSS to only selected tilelayers, and thus assign these layers to an ...
2
votes
1answer
314 views

Using Odyssey.js with Cartodb.js

I'm looking to use Odyssey to create an interactive introduction to various data layers on an interactive web map I've created using CartoDB.js. I'd like to have different data layers turned on / off ...
2
votes
1answer
220 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
5
votes
3answers
10k views

Add GeoJSON layer to OpenLayers 3

I have a GeoJSON file called mygeojson.json and I want to add it as a layer in OpenLayers 3 on top of an openstreetmap layer. So far I could display the openstreetmap world including zoom etc. but for ...
0
votes
2answers
22 views

How to get the distance between a point and a line in openlayers 3?

I've been working lately with openlayers 3 and trying to get a fully offline Mapping app, I am trying to get the smallest distance between a point and a line. I looked for a solution in the api and ...
1
vote
1answer
236 views

Openlayers filter strategy on wfs deactivate problem

I have a filter control which works nicely. However, when I try to reset/remove the filter, I don't get the original features back. The debugger shows my features array as still only being the reduced ...
0
votes
0answers
17 views

Markers display with leaflet and javascript

I have a problem displaying data relating to schools on a div 'info' when click the marker with leaflet and javascript: here's the error: Uncaught TypeError: layer.setStyle is not a function
-3
votes
0answers
15 views

condition that displays two div different with leaflet [on hold]

I wanted to create a condition that displays each time according to different div click on the data on the map
1
vote
2answers
966 views

Using snap point when using measurecontrol in OpenLayers?

I have a problem about measurecontrol. I can use measurecontrol and I can show length to use measure control . But my problem is that I didn't use in snap because measurecontrol is a control, not a ...
1
vote
1answer
19 views

PostGIS raster to UTFGrid

I am trying to create a UTFgrid JSON with a Raster in PostGIS. The goal is to provide weather data for web maps. I found some libraries: https://github.com/Ecotrust/create-utfgrids ...
1
vote
0answers
10 views

Export features to pdf using JSPDF and Openlayers 3?

I built a map with different type of data, WMS layer, Vector Layers ( features extracted them from GeoJson file). Used Technologies : - Openlayers 3 - JSPDF How can i export just the selected ...
2
votes
1answer
317 views

How do I modify the WebAppBuilder "LayerList' widget to use radio buttons instead of checkboxes?

I've downloaded the developer version of the Web app builder and installed in on my machine. I can open up the widget '\LayerList\LayerListView.js', and I have been exploring the source code. I would ...
2
votes
0answers
13 views

3D Visualization in 3D

We have published a geoprocessing tool that gives Raster dataset as output. we are using arcgis javascript api 4.0 version to visualize it on map. But when we use gp.getResultImageLayer , the event ...
1
vote
0answers
10 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 ...
0
votes
0answers
123 views

redraw canvas when add new overlay?

How to redraw canvas when I add overlay layer? Firstly load osm map, then creates canvas. So when I push the botton and add another layer it looks like sandwich and canvas in a middle...first layer - ...
0
votes
0answers
13 views

Openlayers popup not working in IE11

In a js file in openlayers3, this code is not working for Internet Explorer. The problem is after popupLayers, is there a way to make this work in Explorer. var container = ...
1
vote
0answers
12 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 ...
1
vote
1answer
202 views

How to create a infotemplate that displays automatically

I have created a postcode search that that highlights a polygon and zooms in. but I would like it to display a infoTemplate box with having to click in it. I want it to show when the function runs. ...
0
votes
2answers
34 views

OpenLayers 3.15.1 - styleFunction is executed every time I move/change the map

I'm testing the new OpenLayers v3.15.1 and I've a simple question about styleFunction used to plot GeoJSON. My code contains: var vectorSource = new ol.source.Vector({ url: <my geoJson ...
1
vote
0answers
17 views

Non-HTML circle text labels on Leaflet map

I need to save image of Leaflet map with polygon, multi-polygons, circles and text below every circle. I have geojson file with circle and polygon coordinates (lat and lng). I managed to get image of ...
1
vote
1answer
547 views

How to add custom basemaps to BasemapGallery

I would like to add my own custom basemaps to the BasemapGallery. Is there any way I can create my own BasemapGallery with only my maps? I am using the ArcGIS API for javascript. EDIT: for clarity I ...
1
vote
0answers
14 views

Leaflet polyline not working

I'm trying to draw polyline to connect an array of waypoints. But I'm getting an empty div like this instead of a map with route. My code is this: <script> // set center ...
1
vote
1answer
36 views

OL3: data from WFS is added multiple times

I added a ol.source.Vector to my map which receives data from a wfs. Currently I am using ol.loadingstrategy.bbox because there is a lot of vector data and it would take too much time to load it all ...
7
votes
2answers
58k views

How do you get the coordinates from a click or drag event in the Google Maps API V3?

I have made a Google Version 3 Geocoder , I want to be able to pick up the coordinates of the marker when it is dragged or clicked. Below is my code: <!DOCTYPE html> <html> <head> ...
0
votes
1answer
340 views

Parsing XML file with hundred polygons using OpenLayers

I'm using this script but It's not working. <script type="text/javascript"> var raster = new ol.layer.Tile({ source: new ol.source.OSM() }); var xml = new OpenLayers.Format.XML(), wkt = new ...
0
votes
0answers
9 views

How to add multiple JSON files in Gmaps

I'd like to add more than one JSON file into Google maps, using its JavaScript API. In the documentation we the way to add a file is using the following line of code: ...
2
votes
1answer
45 views

Leaflet Routing Machine: how to dinamically change router settings?

I'm using Leaflet Routing Machine in a litte Leaflet + Javascript map. I'm using Graphhopper as router in this way .... var control = L.Routing.control({ waypoints: [ L.latLng(57.74, 11.94), ...
0
votes
0answers
10 views

how to delete vector layer on button click in openlayers 3

Here i'm trying to remove the vector layer when i click on delete button , but somewhere its not working its only hiding the feature not deleting it . Because when i'm calling it start overlapping all ...
4
votes
2answers
737 views

Authentication in Geoserver 2.4.x from a web application

I am trying to build a web application using html and javascript from which I want to login to geoserver hosted at: https://weaveprod.ucdp.utah.edu/geoserver/web/ I have written the following code for ...
4
votes
2answers
204 views

Lat/Long -> UK Easting/Northing?

I have a fairly accurate formula (implemented in C#), which allows me to convert UK Eastings/Northings to WGS84 Latitudes and Longitudes. Despite extensive Google searches, I could not find a formula ...
7
votes
4answers
5k views

Layer loadstart & loadend events in OpenLayers 3

OpenLayers 2 has these layer events "loadstart & loadend." What is equivalent to them in OpenLayers 3? While a vector layer loads and is rendered, I need to show a loading icon.
2
votes
0answers
20 views

Line Layer seems to be floating and shifted after adding terrain effect in Cesium

I had made add a line layer using cesium. In which i had added a terrain effect using the standard cesium terrain provider as below var dataSource1 = new Cesium.GeoJsonDataSource(); var roads = ...
2
votes
1answer
26 views

Convert/display grayscale image as RGB

i want to display raster images using a color palette in a leaflet map. The images are tiled (gdal2tiles) from a single .tif to multiple .png files with values from 0 to 100. I add the image using ...
0
votes
0answers
18 views

Move multiple features, arcgis API for javascript

Is it possible to move more than one feature (polygon, line or point) at the same time using ArcGis Javascript API?
1
vote
1answer
558 views

ArcGIS javascript API setDefinitionExpression returns wrong result set

New to GIS and ArcGIS. I am trying to use the javascript API setDefinitionExpression to limit the output of a FeatureLayer on the map; however, the result set returned by the function is incorrect. ...
0
votes
1answer
31 views

Openlayers 3 - ol.layer.Image rendering on drag'n'drop

I'm using the lastest version of Openlayers 3, aka 3.15.1. I want to use layer = new ol.layer.Image({ map: olMap, source: new ol.source.ImageVector({ source: new ol.source.Vector(), ...
1
vote
1answer
11 views

What is default unit of calculated area in turf.js?

Here is a good example how to calculate area in turf.js http://turfjs.org/static/docs/module-turf_area.html But what is its unit of area measurement (acre/hectare) ?
1
vote
2answers
179 views

Openlayers - ModifyFeature - How to label vertices with a progressive number

I am quite new in openlayer and javascript. I have a control ModifyFeature on a path vector layer. I would like the vertices to be rendered with a stylemap label showing their progressive number ...
1
vote
1answer
225 views

Legend ArcGIS Javascript does not recognize Legend from ArcGIS for server 10.2.2

I have created maps in ArcGIS for desktop and published them to ArcGIS for server 10.2.2. Because of performance issues I have created a group layer of the same map with different levels of details. ...
3
votes
1answer
75 views

Using MSID/MID with leaflet to display Google My Maps data

I'm wondering if there is a way to display MSID/MID with leaflet. I found this forum below; Any way I can load KML data from Google maps (again) via JS API? KMZs work fantastically with the arcgis ...
0
votes
2answers
24 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) ...
0
votes
1answer
85 views

OpenLayers 3: does not display all Features of Layer

I'm using openlayers 3 and geoserver. I want to get and display a wfs layer with openlayers. this is source of my layer: vectorSource = new ol.source.Vector({ format: new ...
1
vote
1answer
105 views

3D OSM buildings seems to be floating and shifted after adding terrain effect in Cesium

I had made a 3D view of the osm buildings using cesium. In which i had added a terrain effect using the standard cesium terrain provider as below var viewer = new Cesium.Viewer('cesiumContainer'); ...
0
votes
1answer
434 views

Leaflet: Scroll wheel controlling map zoom and not drop down menu

Edited 6/19/2015 I have a custom leaflet control box with a drop down menu. When I use the scroll wheel over the menu, the map changes zoom level instead of scrolling the menu. The problem occurs ...
1
vote
1answer
333 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...
0
votes
1answer
262 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
0answers
27 views

OpenLayers misinterpreting Lat/Long

I am currently plotting points on a Open Street Map and using the Lat and Long of a point I know of seems to yield different positions on Google Maps and Open Street Map. //The standard for lat/long ...
3
votes
2answers
3k views

Google Maps need to click twice to get marker click event to trigger

I have a google map that I am populating with real estate listings from a database. I have set it up to refresh the listings when the map is panned or zoomed. I am using the dragend & ...
0
votes
1answer
115 views

WFS from geosever very slow to load in openLayers3

I originally posted this question about trying to load a geoJSON with openLayers3: geojson very slow to load in openLayers3. Based on a suggestion given in the post I'm now loading the layer in as a ...