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
0answers
36 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
225 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
22 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
2answers
50 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
25 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
71 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
73 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
116 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
40 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
34 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
25 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
42 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
115 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
109 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
21 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
33 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
98 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
40 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
114 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 ...
5
votes
3answers
103 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
77 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
40 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
36 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
40 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
18 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
98 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
87 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
136 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
45 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="...
2
votes
1answer
36 views

where i can add style in this code leaflet

var urlborne = 'http://localhost:8080/geoserver/Gestion-proprete/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Gestion-proprete:borne&maxFeatures=2000&outputFormat=text/...
0
votes
0answers
62 views

Loading WFS from Geoserver to Leaflet

I use GeoServer 2.7.0 and Leaflet-0.7.7 and the jquery: <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>` for showing a WFS in my Geoserver. How do ...
0
votes
1answer
82 views

Read WKT geometry using JTS 1.13 in java

I want to create a shape file from coordinates, in the client side I take the coordinates of a polygon by opelayers, it send to a java class, in this class read the geometry of the polygon, when the ...
0
votes
1answer
87 views

How to call the geojson dynamically according to area selection in openlayer 3

I'm trying to get geojson according to the selection of a particular area. For example, if I have selected a built up area it will only show that area . I'm calling geojson data through php page, and ...
0
votes
1answer
89 views

openlayer 3 popup on marker mouseover

I'm only able to get popup on click. Can we get popup on marker mouseover Here's the example link Like in this example popup start display onclick on marker..But i wanted popup will automatically ...
1
vote
2answers
122 views

GML to GeoJSON JavaScript parser

Is there a JavaScript parser to obtain GeoJSON from GML? I have found only Python and OGR solutions.
3
votes
0answers
160 views

How to get the best GPS position Geolocation API

I want to get the most accurate position of my mobile phone with android. I'm comparing accuracy value in 2 seconds interval and if value is less than last value I'm trying to keep the position in <...
0
votes
0answers
17 views

JavaScript API ArcGIS Combine Legend with On_Demand feature class query

I am having trouble adding a legend to my JavaScript code I have a basemap, scale bar, and a click on demand query info box for my feature class which displays the attribute fields but when I add the ...
1
vote
0answers
31 views

Change maxZoom option in runtime to ol.View in Openlayers 3

Im trying to change the maxZoom option once a functionality of the map is activated. So it has to be during runtime so it can be rolled back to the original maxZoom. Creating the ol.View you ...
1
vote
0answers
33 views

Open layers 3, map.on('moveend',..): Differentiate between user interaction and map.setCenter() calling

I am implementing OL for a GIS application and want to add a 20 seconds timeout when the user scrolled the map, after which the GPS auto track function should resume. For that I am utilizing the map....
1
vote
1answer
17 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?
0
votes
1answer
88 views

Add and later access Leaflet.draw polyline index and a new property value

I am using the Leaflet draw plugin located at https://github.com/Leaflet/Leaflet.draw and what I want to do is when a person draws a new polyline to print in the console the index number of that ...
1
vote
0answers
24 views

How can I ask for location and display it on map on my website? [closed]

I have added a map to my website. Now I want to add a feature to it wherein when a user clicks on the add event button on the header a popup should appear which ask for event name and location and as ...
2
votes
1answer
40 views

Add Links to Leaflet Choropleth Map

I'm making a choropleth map based on this example I would like to add links to the map, so that when a user clicks on a state they will be taken to a specific page. For example, a user clicks on ...