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)

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 ...
1
vote
1answer
22 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 ...
1
vote
2answers
1k views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // =============================================================================================...
0
votes
1answer
459 views

Plotting GeoJSON data on map using ArcGIS API for JavaScript?

We are developing the portal in which we are using Arcgis javascript APIs.The requirement in our project is one of the weather provider is going to publish the webservice which will return the weather ...
0
votes
1answer
472 views

google.maps.InfoWindow is not working

If anyone encountered the same problem and come up with the solution please give me an idea if what's wrong with this code. The InfoWindow is not working when i click the map polygon. All parts ...
1
vote
1answer
91 views

leaflet.heat heat map highlighting overlapping areas

Lately I've been working on heat maps using the leaflet.heat plugin. I have a set of points in the WGS84-system with the following structure: latitude | longitude | weighting | type The weighting-...
0
votes
1answer
206 views

Create a polygon from an array of coordinates in arcgis javascript api

Well I am building a GIS web app using ArcGIS Javascript API , I want to create a user interface in which the user provides an array of coordinates and I have to get those coordinates and create a ...
0
votes
1answer
229 views

Openlayers 3 custom Polygon feature

I'm trying to create a custom Polygon style for my layer style. I receive some information about position, orientation and age for a number of objects and I want to represent those as zoom ...
1
vote
1answer
229 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 ...
2
votes
1answer
321 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 ...
5
votes
3answers
11k 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
44 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
248 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
29 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
1
vote
2answers
979 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
41 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 https://github....
1
vote
0answers
25 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 ...
3
votes
1answer
352 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 ...
0
votes
0answers
132 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
25 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 = document.getElementById('...
0
votes
2answers
42 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 URL>...
1
vote
0answers
23 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
0answers
28 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
39 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
60k 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
0answers
18 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: map.data.loadGeoJson('somefile....
2
votes
1answer
74 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
28 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
751 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 ...
5
votes
2answers
220 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 ...
9
votes
4answers
6k 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
34 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
34 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
21 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
601 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
52 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
18 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
188 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,...
3
votes
1answer
100 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
1answer
119 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 ol.format....
1
vote
1answer
169 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
453 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
0answers
37 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 ...
0
votes
1answer
131 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 ...
2
votes
1answer
26 views

Exclude empty variables from OpenLayers 3 popup window

I have a map displaying multiple locations loaded from a JSON file. The locations are contained in a MySQL database along with various variables for each location including whether or not the location ...
1
vote
2answers
20 views

How to exclude parts of route based on street features?

I have a task. I have a route (coming from whatever, I am using Google Maps for now, but I can switch to OSM), and I want to exclude some parts of this route based on street features (like I don't ...
1
vote
0answers
32 views

Display a layer stored in GeoServer with Leaflet

I wanted to display a layer stored in geoserver with leaflet, I used this code but it's not working. var map = L.map('map').setView([4.477411, 21.309284], 3); L.tileLayer('http://{s}.tile....
0
votes
1answer
58 views

OpenLayers 3 opacity overlapping

I've got some issues with OpenLayers 3 when displaying a Vector layer with opacity. The more I pan or zoom in the map, and the less transparency there is on the features. I think this comes from the ...
2
votes
1answer
53 views

Adding labels in cesium

I tried adding labels to my cesium application using the below code var entities3 = dataSource3.entities.values; var colorHash = {}; for (var i = 0; i < entities3.length; i++) { ...
1
vote
1answer
14 views

Viewing the data without any background imagery in Cesium

Is there a way to completely disable the background imagery in cesium? I would like to see only my data without any background imagery. Is this possible?