An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

learn more… | top users | synonyms (1)

2
votes
1answer
387 views

How to get the total km of route using Leaflet Routing Machine API?

I'm using machine leaflet route to draw routes I can get the total route miles? How can I do this? I know the class IRouteSummary, but I am unable to access it. Just wanted an example so that I can ...
0
votes
0answers
14 views

Convert *.nmea data into a track and visualize with Leaflet.js

I've got some files in *.nmea format that originate from a car dashcam and which store, among other things, the driven route via point geometries with lon/lat, date, timestamp and speed. The data ...
2
votes
1answer
266 views

JSONP working with Leaflet time slider

I would like to integrate the time slider into a JSONP geoserver. Here is the current code I have http://jsfiddle.net/qcwcrwge/26/ and I would like to use the time slider with a layer called ...
0
votes
1answer
51 views

Passing data into leaflet js via a php script

I'm trying to display route data on a map using leaflet. I'm pulling the data from a MYSQL database with a php script. which is working. The data is stored in an array called vechiclelatlong. I use ...
0
votes
1answer
36 views

Convert WGS-84 position into lat/lng

I am using leafletjs. I have a list of "WGS-84" positions that look like: LATITUDE N45 52.1096 LONGITUDE W125 52.4665 LATITUDE N48 24.1051 LONGITUDE E174 37.3832 What is the significance of the ...
2
votes
2answers
484 views

How does Leaflet layer ordering work with CartoDB layers?

All, I'm trying to figure out how Leaflet layer ordering works when you have layers coming from CartoDB. I have a map with 1 polygon layer (cartodb), 3 point layers (cartodb), 1 basemap layer ...
1
vote
1answer
21 views

Horizontal Legend Leaflet.js

I'm trying to make my legend horizontal em leaftlet by I'm not sure what I have to change. My base legend is based on this tutorial. Ultimately what I would like to have is something like this. Any ...
0
votes
1answer
13 views

Adding multiPolygon to featureGroup

I'm trying to add multiPolygon to a leaflet featuregroup var latlngs = [ L.latLng(52.919803809533754, 0.6671244638974255), L.latLng(52.919803809533754, 0.9753146428868592), ...
1
vote
0answers
47 views

How can I export symbology and labels with QGIS Leaflet to webmap?

If I make a map in QGIS export it with Leaflet the symbology and labels don't appear on the webmap. Is it possible to export them? If yes, how to export the all map?
0
votes
0answers
47 views

Implement Leaflet search box for 370,000 points stored in PostGIS served as raster tiles

I have built http://opentrees.org. It's a TileMill/PostGIS/Leaflet stack with raster tiles and UTFGrid interactivity. I'd like to add a search box, so users can search for a feature – trees in this ...
0
votes
1answer
16 views

Leaflet Marker - toggle draggable

I have a leaflet marker created similar to the example below. var marker = L.marker([map.getCenter().lat,map.getCenter().lng], { alt: tempID, icon: starIcon, draggable: true ...
0
votes
0answers
33 views

Density Heat Maps using R

I recently have been reading about mapping GIS information in R. I have 2 data sets from work. Without going into too much detail, the first data set is a list of failures with Geo Codes, the second ...
1
vote
0answers
19 views

Loading lots of points on leaflet through time slider.

I'm trying to add more than 13 thousand point using Time Slider plugin, but as you can imagine the loading process of all these points puts a heavy burden on the map. Even the slider start to get ...
0
votes
1answer
30 views

How to update a popup content from its marker?

I created a popup with Leaflet doing so: marker.bindPopup(content).openPopup(); How can I update the content value afterwards? I suppose to do it from the marker, something like this: ...
1
vote
1answer
147 views

Leaflet and census block data: not displaying

I am new to leaflet and am trying to load a geojson file showing census blocks and associated information for a city in CA. It is a small city and not too many census blocks. I cannot get the popup ...
0
votes
1answer
28 views

Leaflet TimeSlider not showing points correctly

I'm trying to add about 13 thousand points in a map using the TimeSlide plugin, but my points are not following a logical order of appearance. When I use the slider I get the dates in the box below in ...
1
vote
1answer
55 views

How can I automate interactions with vector features in Openlayers3(canvas) like it is done in Leaflet(SVG)?

I want to automate and test some aspects of my map application in Openlayers 3. I mainly want to automate clicking on markers and other vector features(ideally through the DOM using xpath like SVG). ...
6
votes
1answer
196 views

Moving a shape around the earth while maintaining the proper projection

What is the transformation needed to be taken on every data point of a shape to rotate that shape around the globe. I'm trying to figure out the math behind this kind of transformation so I can ...
5
votes
2answers
715 views

*Leaflet* mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the ...
2
votes
1answer
421 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
0
votes
0answers
39 views

Error when trying to bind popup on geojson, failed to execute 'appendChild'

I'm trying to load more than 13 thousand points in leaflet from a geoJson file, everything seems to work just fine except the Popup function. I've looked everywhere for a solution and most answers out ...
0
votes
0answers
41 views

Trouble calculating bounds for TMS raster image tile layer

I am using TMS tiles created from a flat image. Originally the export tool created a sample openlayers file that works correctly. The top level tile folders are labelled 0-5. I've renamed these to 2-7 ...
1
vote
2answers
2k views

How I can load tileLayer in Leaflet framework using local tiles?

I'm using file:///C:/path/tiles/{z}/{x}/{y}.png like url of tileLayer but it doesn't work and no error is shown. var layer = new L.tileLayer("file:///C:/OSM/tiles/{z}/{x}/{y}.png", { minZoom: ...
2
votes
1answer
51 views

Draw heatmap only over water layer using Leaflet?

I need to draw a heatmap, but only over water because I want to represent water heat level. I am using Leaflet. How can I do it? I found an only-water layer, maybe it would be usefult for developing ...
2
votes
0answers
21 views

Leaflet: get the color of a specified pixel on the map

I need to get the color of a specified pixel on the map. How can I do it using the current API of Leaflet?
0
votes
1answer
35 views

Fixing mercator coordinates that are outside the world bounding box?

I'm using mercator-projected overlays from a crowdsourced website where volunteers georectify images of maps by hand. Unfortunately, the slippy map that serves as the site's interface wraps and allows ...
1
vote
1answer
56 views

Webmapping js library with best support to WFS-T

I've tried to use WFS-T in ol3 but it was really a hard task, it seems that WFS-T is badly undocumented feature and it's much complicated to implement, and i'm looking for recommandations concerning ...
1
vote
1answer
21 views

Adding hyperlinks to Leaflet polylines created via Leaflet.Draw?

[Cross posting from StackOverflow as I realized this may be a more specific community for this] I'm using Leaflet.Draw, and I want to allow the lines that I draw to have hyperlinks in them so that ...
0
votes
0answers
19 views

L.Polygon getting distorted when panning a map

I am using Mapbox with leaflet. I have drawn a simple polygon with a hole inside that polygon. I have done this using L.polygon and passing an array of points inside it and another array in reverse ...
0
votes
0answers
28 views

how to apply a canvas 'grid' to leaflet without curvature

I'm trying to create a grid of tiles in canvas to represent some data the original data comes with UK OSEAST1m and OSNORTH1m, i'm the grouping the data up into aggregates of, say 40km (as per the ...
1
vote
1answer
139 views

Can't project ArcGIS Tiled Service for Esri-Leaflet

I'm following this example from the esri-leaflet docs. I have an ArcGIS Tiled MapService in ESRI:102696. So I'm trying to use Proj4Leaflet to project the service and use it in my application. I ...
-1
votes
1answer
28 views

combining mbtiles and getZoom to visualize with Leaflet

I have exported MBTiles as single file for every zoom scale. Now I can add map manually call them with mbtiles.php server. But I want to accumulate it in one and get the mbtiles file on zoom scale ...
0
votes
1answer
55 views

Reset Leaflet map

I'm creating a map like this: var map_object = new L.Map('map', { center: [39.8282, -98.5795], zoom: 5, }); var sublayers = []; ...
1
vote
1answer
30 views

Guessing unknown projection of Webapp

I have a series of points around the greater london area (may be also around 100-200kms away from it) like those here in the format Lon, Lat: 43032.1,32681 95816.5,34473.8 15439.3,-13987 The ...
0
votes
2answers
30 views

CartoDB/Leaflet bring layer to front

I've got 2 layers being rendered separately with this: var layerSource = { user_name: 'jonmrich', type: 'cartodb', sublayers: [{ sql: "SELECT * FROM " + ...
0
votes
1answer
43 views

Leaflet Geojson Styling

How can external Geojson feeds be styled in leaflet? To add my external feed I'm using the snip below: var mygeojson = new L.geoJson(); mygeojson.addTo(map); $.ajax({ dataType: "json", url: ...
1
vote
2answers
80 views

No popup on map if no feature is selected

I've got a webmap showing data coming from a Geoserver instance. With better.WMS.js I made it possible to display popups. Everything works nice except that the map shows popups too where there is no ...
0
votes
0answers
18 views

Pixel based transparency or “Lighten” on geoserver

This is similar but different from this question. I'd like to statically assign a transparency of one raster based on another raster. For example, say I had a raster of aspect in a spectral gradient ...
0
votes
1answer
42 views

LeafletJS Measurement of distance in deepzoom tilelayer

I have been trying to understand how LeafletJS determines distances between two points in a layer. I am trying to implement the custom scale plugin, (and have done so successfully) on a static tiled ...
0
votes
0answers
28 views

Displaying measurements on a grid of the Earth

I'm developing an application where I need to draw the averaged results of some measurements on a map. Right now, I'm using Leaflet to draw the map with MapQuest/OpenStreetMap tiles, and have the ...
0
votes
1answer
29 views

Removing added layer using leaflet and Cartodb

I've added a layer to a map via Leaflet. It's actually a circle around a point. This gets added perfectly. I'd like for it to be removed when I click a certain button. Here's how I'm creating the ...
1
vote
2answers
152 views

Load or display differents geojson data on zoom level for leaflet maps

I have a map with 3 levels of information. The first is the country, the second the state and the last one the cities. I wonder know if it's possible to use the zoom value in order to display the ...
0
votes
1answer
40 views

Mapbox.js setStyle differently for each element

I'm using geoJson in a featureLayer so I can use the setFilter-Function. My question is: How can I use the setStyle-Function and give Elements with different properties different colors? My Code: ...
1
vote
1answer
45 views

Leaflet popups events through CartoDB

How I can use the leaflet popups events throught CartoDB. I have seen that some events are working like 'click', 'movestart',but 'popupclose' and 'popupopen' are not working. My goal is to do some ...
0
votes
0answers
78 views

leaflet-routing-machine add waypoints, routing summary

I'm playing around with leaflet-routing-machine (https://github.com/perliedman/leaflet-routing-machine) and have 2 questions about it's usage: 1) I have the following code now routeControl = ...
0
votes
0answers
20 views

Subtract parts of polygon that overlap with ocean

I have some seismic data in format of shapefiles/geojson. The data has no relevance in the oceans so I am looking to strip away those parts of the polygon. What I am currently doing is using the ...
1
vote
2answers
89 views

IE8 problem with proj4.js

This problem is in IE8 and not in Firefox. My first problem was that IE8 don't support JSON natively and I get the "JSON is undefined". I solved this by including json2 or json3. Now JSON.parse ...
8
votes
1answer
297 views

How to add an attribution on a GeoJSON Layer from Leaflet?

I need to use a GeoJSON Layer on my Leaflet map. Here is a sample of my code: function onEachFeature(feature, layer) { if (feature.properties && feature.properties.popupContent) { ...
0
votes
0answers
50 views

How do I get popups to function in this interactive map?

I'm trying to create an interactive map like the Mapbox one demonstrated here Scroll-driven navigation map however, I want to have markers with popups. I cannot figure out what is prohibiting the ...
1
vote
1answer
715 views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...