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
0answers
31 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 ...
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
24 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 ...
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
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....
2
votes
1answer
21 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
2answers
47 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 ...
3
votes
1answer
76 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....
0
votes
0answers
28 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
31 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 ...
1
vote
0answers
29 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 ...
0
votes
0answers
31 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 ...
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 = ...
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 ...
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?
2
votes
1answer
35 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 ...
1
vote
1answer
20 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) ?
0
votes
1answer
54 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(), ...
0
votes
3answers
56 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,...
3
votes
1answer
102 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 ...
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 ...
2
votes
1answer
31 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 ...
0
votes
1answer
15 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 ...
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<...
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
1answer
21 views

mapbox with markers and checkboxes - disable all from showing on initial load

I have a page I built to display wind direction/velocity in various locations along a bike trail: http://microflush.org/cgi-bin/pathInfo.cgi I have several markers in a legend, with check boxes to ...
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 ...
2
votes
1answer
80 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), ...
1
vote
1answer
81 views

Add Legend to Leaflet Map

I have a leaflet map that consists of various wms layers representing different years. I am trying to add a legend to my leaflet map but with my own custom hex colours instead of trying to use a ...
1
vote
0answers
17 views

Function access to surrounding object's variable

var CreateFeature = OpenLayers.Class(OpenLayers.Control, { clazz : "xyz", set_item : function(e) { var position = map.getLonLatFromPixel(e.xy); var latitude = position.lat;...
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....
1
vote
1answer
31 views

White tiles with Google Chrome and OpenLayers 3 [closed]

I created personal tiles on my webserver, which works with Apache. These tiles are in folders from 0 to 16 in Jpg format. I render these local tiles with OL3.15.1. On Firefox, IE Edge and IE10 I've no ...
0
votes
0answers
74 views

OpenLayers 3 - popup auto pan

I created a simple OpenLayers3 map with the plugin Qgis2web. It consists of a basemap with points. Every point has its own popup. This is the html code for the map and for the popup. <div id="map"&...
1
vote
0answers
38 views

hide and show a feature from group feature with checkbox in leaflet

To begin I will explain the code, I have a checkbox generated after loading the web page by the next code var CPID = new L.GeoJSON(false, { onEachFeature: function (feature, my_Layer) {...
1
vote
1answer
95 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-...
1
vote
1answer
25 views

Catch WMS empty answers with OpenLayers 3

I was wondering if there is a way with OpenLayers 3 to catch problems with WMS layers, such as the service not answering, or not sending any images/tiles. So that in case of errors with a distant WMS ...
4
votes
3answers
88 views

Open layer 3: Need help in print tool

I am developing an print map function in ol3 application it includes some functionality such as if its polygon then area of that polygon will be display OR if its line length will be display. At ...
2
votes
1answer
65 views

Using JQueryUI Slider to change Layer Display (Leaflet)?

Can't seem to figure out how to use JQueryUI Slider to change the layer display on my leaflet map. Scenario is basically, When user slides bar across a dfferent layer shows up on the map (in years) ...
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
0answers
34 views

Loading huge amount of data in OpenLayers 3

I have been working on a PoC to load a huge amount of data ~ 350k-500k but I haven't been successful so far. I tried loading JSON then converting them to ol3 features (failed at 130k) then I used ...
0
votes
1answer
17 views

Simply trying to add another layer to openlayers3 script

Hi guys so im simply trying to add new layers with each as their own variable so i can turn them on and off, instead of just stacking all the layers under the variable 'layers'. See script below <...
3
votes
1answer
33 views

How do I remove the terrain checkbox from Google Maps?

I don't mind having the map/satellite options, but I don't need the terrain option for my map. How do I disable just that? I don't see it documented well on https://developers.google.com/maps/...
1
vote
0answers
15 views

Can we combine SVG Overlay with MarkerCluster v3?

I have searched here and there on how to prevent the overlapping circle (svg) layer created from json file. Poor me, no luck till now. Since I doesn't know how to prevent the overlapping circle I ...
0
votes
1answer
73 views

OL3 how to get WKT representation of a Polygon

I have a vector layer in ol3 that i want to export to a shape file, I take the geometry of the polygon. In an attempt to fix an issue with my WKT (see this question) I add the first coordinate to end ...
2
votes
1answer
70 views

Adding WMS layer with CQL filter

I would like to add to my leaflet's web map layer from my WMS service (Geoserver), but I need to use CQL filter in GetMap link: localhost/geoserver/my_location/wms?(...)&CQL_FILTER=[...] Is ...
-5
votes
2answers
102 views

How to remove attribution in Leaflet

I want to remove the leaflet.com that appears on the right bottom of the screen here
1
vote
0answers
18 views

After Feature Layer reference is added all dojo references are not recognized

I'm creating a simple javascript management system in which I have to query 6 feature layer services, edit, add or delete data from the services. Every time I want to add the Feature Layer reference ...
1
vote
0answers
42 views

Why reprojection GeoJSON with new.ol.View - not working?

I try to reproject GeoJSon file in OpenLayers 3 from : Geojson link With these JS in head : <script src="js/jquery-2.2.3.min.js" type="text/javascript"></script> <link rel="...