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

learn more… | top users | synonyms (1)

0
votes
1answer
8 views

load json url into a leaflet map

Based on this example http://labs.easyblog.it/maps/leaflet-layerjson/examples/overpass.html I'm trying to load the following url into a Leaflet map ...
0
votes
1answer
144 views

How to open a popup on Marker click when Markers are in array using leaflet maps

Hey guys I have a set of Markers that are getting created dynamically on a .each loops like so. $.each(data, function(index, element) { markerArr[element.id] = ...
2
votes
1answer
897 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 ...
4
votes
4answers
79 views
+50

Export to KML option using Leaflet?

I am very new to this GIS thing. I have to integrate export to KML option in one of my project. I could not see this option while googling. Is there option to do this? <!DOCTYPE html> ...
1
vote
0answers
16 views

Different Leaflet fillcolors for different layers

I have a leaflet map set up with two layers and I want them to use different colorization functions to color the choropleth shapes. My shapes are set up in layers like this: var povertyLayer = ...
2
votes
1answer
57 views

Submit form information from a leaflet popup to MySQL table

I have a leaflet map and I want to have the user fill out a form in a leaflet popup and upon clicking the 'submit' button - the information in the form will be inserted into my MySQL database. As a ...
0
votes
0answers
5 views

How to keep leaflet tooltips within visible map view

I have a map with panning and zooming disabled, creating a bounding box. This map has a geojson layer with features and tooltips displaying underlying data. The issue is when the user mouses over ...
0
votes
0answers
9 views

Leaflet map altering page scroll behavior

When scrolling down a page and past a leaflet map, if the user's mouse cursor is inside of the map, then the scroll bar stops and the browser window becomes stuck on the map. Is there a way to ...
2
votes
1answer
16 views

Cartodb add basemap switcher

I currently have a map created entirely in the CartoDB editor, including custom map. For some reason it doesn't allow you to add an attribution in the editor but thats a different problem. So my map ...
0
votes
0answers
17 views

Is it possible to set the extents in which labels appear in Leaflet?

I'm fairly new to leaflet and web mapping in general. I was curious if there is a way to set labels to only appear at a certain range of extents. The point data layer I have clusters too much ...
1
vote
1answer
177 views

Leaflet Draw - Get Circle extent

I am using Leaflet.Draw to draw a circle. var circle = L.circle(new L.LatLng(latitude, longitude), number, circle_options).addTo(featureGroup); I need the coordinates of the circle as a polygon ...
0
votes
0answers
15 views

Zooming into State using R Leaflet

I am using R LeaftLet package to create a interactive choropleth of the US Map. There are several tutorials online and I am able to create interactive state level map with pop up and zoom. Also I ...
2
votes
1answer
17 views

Leaflet cirlceMarker changes with zoom

I was under the impression that L.circle changes size with zoom, but L.circleMarker should remain the same radius as you initially set? I've setup an example here, which ever I choose the circle ...
1
vote
2answers
481 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
2
votes
1answer
38 views

Proj4 for EPSG3857

I am using leaflet and the R library sp. The CRS from my leaflet map is EPSG3857 - WGS84 Web Mercator. I am retrieving the coordinates of my current map view with getBounds(). For further calculations ...
0
votes
1answer
202 views

Creating Leaflet layer that can be toggled in layer control from CartoDB viz.json?

How do I create a leaflet layer that can be toggled in the layer control from a cartodb viz.json? I have read that the cartodb.createlayer does not create a leaflet layer. It seems you can add the ...
2
votes
1answer
13 views

Leaflet polygon (multi polygon) to CQL equivelent

I am using leaflet with geoserver. I want to set up a CQL filter to do an intersect but having an issue with getting the geometry from leaflet polygon to cql polygon. For instance, the feature has ...
0
votes
0answers
21 views

Missing Leaflet icon with Html2canvas

I am using Html2canvas to capture images from a map viewer and Leaflet to add custom icon marker. The origin of the marker is at the top-left corner so when it is added to the map, the geographic ...
2
votes
0answers
10 views

Click event returning wrong Y container point in Leaflet

I am using QGIS Server and Leaflet to display geotiffs on my website. I have created an onMapClick function which uses a GetFeatureInfo request to QGIS Server which returns the value of the geotiff in ...
2
votes
0answers
15 views

Can we set the latlng start point : leaflet

I am working with the leaflet api.... I was lately, trying to figure out how to change or set the latlng start point in leaflet map..... Currently i am working on use image as map,,,,the ...
0
votes
0answers
10 views

Calculating pixels in leaflet

I am working with leaflet plugins, calculating distance between two points of a polyline or whole distance of joint/multiple lines Work : I set up the script to measure the distance in meters when ...
0
votes
0answers
15 views

Qgis2Web wfs data doesn't show

Hi i've eneabled the plugin qgis2web. after getting one WFS-layer in de QGIS I started the gis2web plugin. Because it is a wfs-layer and i want leaflet to use that wfs i don't check the Encode to JSON ...
0
votes
0answers
15 views

How to bind popup in the centre of a layer react leaflet

I have a <Map> component with <Geojson> component with in it. I want to bind a popup in onEachFeature method. I have successfully done layer.bindpopup(); but don't know how to bind it to ...
3
votes
1answer
169 views

How to create an exact tracking route from GPS data with animated icon?

Probably this is not purely GIS related question, its related to developing issues. I am just asking if there is any kind of suggestions from Gurus. I am building an tracking application where GPS ...
2
votes
0answers
16 views

Cant' get the correct measurements : LeafLet

i am working with the simple app Beta Here The application is using leaflet plugins/api.... User draw a line(poly-line) on the map/image and then enter the distance between two points.... Working ...
0
votes
0answers
8 views

how to bind custom marker controls to map : leaflet

I am working on map control app using leaflet plugin .... I added a custom button for marker in side toolbar.... Target I want to put marker on map when i click on that button....in other words i ...
1
vote
3answers
1k views

multiple, simultaneous TileLayers in leaflet?

I would like to have two tile layers in Leaflet, one a conventional set of tiles, and another composed of PNG tiles with transparency, so basically a tiled overlay layer. Is this possible? I see ...
2
votes
1answer
568 views

Leaflet Map Dropdown

I am attempting to create a simple basemap selector to use in a leaflet map to assist in selecting a basemap of interest. I've created a new Select control that works great in a computer browser but ...
0
votes
0answers
17 views

How to get number of pixels between two points

I am working with the simple app which is using leaflet plugins.... I want to get the number of pixels when i draw a poly-line on map(from one point to another using poly-lines).... Actually i don't ...
0
votes
2answers
41 views

Leaflet MapBox addlayer

I'm newbie in coding and I'm trying to modify some downloaded GitHub code to make customized application and display my data. AddLayer function is making me desperate. I'm trying to add data from ...
0
votes
0answers
11 views

Sub catagories in leaflet layercontrol

I am trying to create subcategory in layers which looks like below and trying to display the Banks on basis of their names. I created a new control customLayerSwitcher = L.control({ ...
2
votes
2answers
245 views

Most efficient way to use UTM in leaflet

Our server is using UTM internally. We then send a large number of UTM Coordinates to display them in a custom made leaflet layer. First we transform (unproject) them into "normal" geographical ...
1
vote
1answer
38 views

GeoRSS in Leaflet

is it possible to integrate GeoRSS in Leaflet and how? Couldn't find any hint. For example this georss: http://www.geonames.org/recent-changes.xml Which looks like.. <?xml version="1.0" ...
0
votes
1answer
89 views

Multiple GeoJSON Layers

I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I have ...
1
vote
2answers
36 views

Displaying ESRI REST services in MapBox?

I'm working on a web site that displays a couple of maps, with generic base layers, over which we display a number of customer-configurable overlays. We've built it using MapBox - currently version ...
0
votes
1answer
164 views

Leaflet map - custom markers from CSV and referring to CSV / GeoJSON marker properties?

I run a non-profit online resource called the Megalithic Portal and have created a Leaflet map that uses Leaflet.geoCSV to load in points from a CSV file github.com/joker-x/Leaflet.geoCSV To see ...
3
votes
0answers
61 views

Using Waze map tiles with Leaflet

I came across this Map Comparisons where they have used Waze map tiles. I searched around and couldn't find any official documentation for using Waze tiles in leaflet. I couldn't even find their ...
7
votes
1answer
2k views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
0
votes
1answer
53 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 ...
2
votes
1answer
469 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
0answers
43 views

gdal2tiles: how to make filenames of tiles to represent xyz coordinates?

I'm converting ECW file to tiles using gdal2tiles. Right now the tiles and folders generated by gdal2tiles are named as numbers starting from 0 successively. The folder structure looks like: How to ...
1
vote
2answers
47 views

leaflet / change a geojson divicon html

I have a geojson layer with a divIcon and now i want to change it. i have tried whit seticon but it does not work. How could i do it? This is what I am trying: papesjson.eachLayer(function(layer){ ...
1
vote
1answer
182 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
0answers
43 views

XY bounds for L.tileLayer in CRS.Simple

Sorry for my english Hi, I have leaflet.js (image of map 5913x7863) and there L.CRS.Simple I had var imageBounds = [[1468.9700,-11.7050], [1968.2705,363.7705]]; var file0 = new ...
1
vote
4answers
57 views

Does Google Maps API or OSM provide location/place boundaries

I've been digging around today in Google Maps and Leaflet API's to find if there is an easy way to get these boundaries instead of needing our users to manually outline these things (like drawing ...
0
votes
1answer
20 views

mapbox geojson + leaflet + custom markers

In the geojson file the following can be found for a marker (coming from mapbox geojson) "marker-color":"#1087bf","marker-symbol":"monument"} I would like to find a solution so monument will be ...
2
votes
3answers
273 views

Prevent Leaflet from requesting non-existing custom tiles

I have created custom tiles using TileMill. extracted tiles as png images and adding them on base layer. using following code var venu_map = new L.tileLayer('static/b18/{z}/{x}/{y}.png', { ...
3
votes
1answer
44 views

Leaflet + GeoJson = problem with style

I got my first leaflet + geojson project partly working! (even the popup with content from the geojson file!) but I still have a problem with style the geojson (export from mapbox) file has point, ...
0
votes
1answer
341 views

Positioning leaflet divIcon when adjusting size using css

I am using the L.divIcon when using iconSize:null which is causing iconAnchor:[0,0] to not be recognized,my code looks like this: var divIcon =L.divIcon({ className:'current-location-icon', ...
0
votes
1answer
447 views

How to export to all points within Leaflet polygon?

Is it possible to export all points within a polygon drawn using Leaflet? (http://leaflet.github.io/Leaflet.draw/).