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

learn more… | top users | synonyms (1)

1
vote
2answers
95 views

Load geojson files from a dropdown list

I would like to load geoJSON from a dropdown list. Everything i found was internal plugin for leaflet such as leaflet-geojson-list. I have a html dropdown list but I don't know how to link my geoJSON ...
1
vote
1answer
66 views

Problem with legends, leaflet

I am not very good at js and new with leaflet so i my code may be a bit messy but stil... I have a problem with my legends, i have 2 legends and many overlays and i want some legends to be "linked" ...
0
votes
1answer
186 views

Leaflet : How to update polyline ? Live Tracking

var ColorVar = '#bd0026'; var firstpolyline = new L.Polyline(polyList, { color:ColorVar, weight: 8, opacity:0.8, smoothFactor: 1 } ); ...
0
votes
0answers
30 views

How To create a OpenLayers-Control from existing Leaflet-Plugin

I already asked a question on Stackexchange that no one could answer: MarkerCluster Animation for OpenLayers2 with Lines So I would now like to know if someone has already used a Leaflet-Plugin to ...
2
votes
1answer
508 views

installing geojson-vt with Leaflet

Super rookie question I'm sure, but I need help using the leaflet plugin geojson-vt. According to tutorials, like this one on http://bl.ocks.org/Sumbera/c67e5551b21c68dc8299, there should be a js file ...
0
votes
1answer
110 views

Use lamber 93 imageOverlay with leaflet on top of OSM tiles layer

I'm trying to use a lambert 93 image overlay on top of an Open Street Map title layer. var map = L.map('map'); L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { }).addTo(map); var coords = { ...
0
votes
1answer
307 views

Bootstrap and Mapbox: Nav Bar layer selection

I am building an interactive mapping solution for my employer and have run into a bit of a hangup. I am working with bootstrap for the first time and cannot figure out how to link the dropdown list ...
0
votes
0answers
43 views

Setting maxbounds in leaflet according to WFS / WMS layer bounds

A leaflet map has the option to set the maximum bounds a user can pan it. I'd like to set these bounds dynamically (i.e. setMaxBounds method) according to the bounds of a given WFS layer. The goal is ...
0
votes
0answers
57 views

Web mapping application with select/unselect features and receiving names of selected features on map

I am creating web application that need to have the following functionality: display polygonal features on the map (about 20-50 Mb if GeoJSON) on click on feature - select them and view names ...
0
votes
1answer
198 views

How to draw a rectangle on a Leaflet map from GeoJSON data

I am trying to draw a rectangle on a Leaflet map with JSON data which looks like this. var geojsonfeatures = {"type":"FeatureCollection","features":[ {"type":"Feature", ...
0
votes
1answer
66 views

resetStyle in geoJSON pointToLayer circleMarkers

I am creating a geoJSON layer, with pointToLayer returning circleMarkers. In that layer's oneachfeature, I am triggering a style change on hover, and this works fine. However, I cannot reset the style ...
0
votes
0answers
57 views

Does Leaflet handle TopoJson in OSGB EPSG:27700 projection?

I already have a Leaflet map showing custom base map tiles in British OSGB projection, EPSG:27700 (using the Proj4Leaflet plugin). I would like to overlay some nationwide admin boundary data in the ...
0
votes
0answers
88 views

Box zoom out in leaflet maps

I am using leaflet for creating maps in web and geoserver for serving maps as WMS layer.Leaflet has box zoom-in tool when we click shift and drag on the map. Similarly I need box zoom-out in ...
0
votes
0answers
27 views

Leaflet GeoJSON ignores first clicks

I have a functioning Leaflet map. In order for the click event to work I have to click on the area that has the event then click on an area without an event then click on the area with the event to ...
0
votes
1answer
190 views

switching the layers on/off in leaflet map layer tree based on styling

I am developing web application which has leaflet maps. I need the layer control which is similar to QGIS I am using Geoserver to get the layer as wms format and I added that layer using ...
1
vote
2answers
131 views

Adding properties to pop ups in leaflet maps

I have a leaflet map which display pop-ups that give the name of a country when clicked. How can I add additional properties and have them all displayed, similar to this map ...
0
votes
4answers
258 views

Leaflet Layer Control not visible

What am I doing wrong here? Everything is working fine, except that the layer control is not showing at all.. hhLayer and wpLayer are L.geoJson(); in case that helps. <script ...
0
votes
0answers
43 views

How to calculate pixels on latlng base: leaflet

I am working with the leaflet api.Where User draw a polyline and latlongs saved in variables. I been looking for a leaflet function which suppose to take latlongs and calculate pixels.Found the ...
0
votes
1answer
75 views

How to implement close Popup for Multipolygon?

I am closing the popup for geoJson (layer.closePopup()) to make a modal to appear. The function works fine for regular geometry but fails for Multipolygon. I get the error - ClosePopup is not a ...
0
votes
3answers
87 views

EsriLeaflet - Problem with special german projection

I got a service with EPSG:3068 (http://epsg.io/3068-15949) My test code to diplay this service on an Leaflet Map with Esri-Leaflet is as following: <!DOCTYPE HTML> <html> ...
1
vote
2answers
152 views

Loading Json properties in a popup using leafletjs

I have a geojson file (tide_gauges.geojson) { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, ...
1
vote
1answer
96 views

Converting Esri Leaflet featureCollection to JSON?

I've followed the Esri Leaflet sample code found here: http://esri.github.io/esri-leaflet/api-reference/tasks/query.html //Querying features near a latlng var latlng = L.latLng(45.51, -122.70); var ...
1
vote
1answer
169 views

leaflet - any way to add another layergroup on top of a heatmap layer?

Layering with z-index works when using layergroups - but is there any working way to have another layer with circles or other elements ontop of a layer with a heat-map? The heat-map seems to be ...
0
votes
2answers
65 views

Marker Not being removed : leaflet

I am working with the leaflet api.Where i have added custom control for marker. And i have a button which tends to remove all markers. Problem Through wrapping, i have to remove all markers but ...
1
vote
1answer
290 views

mapbox - how to generate a random coordinate inside a polygon

I've seen the leaflet plugin for mapbox which finds the polygon within which a specific point / coordinate lies, but how would I do the opposite - generate a random point / coordinate within a ...
1
vote
0answers
27 views

Leaflet MarkerCluster plugin. Weighted Points

I have an huge amount of points I'd like to have on the map so instead of sending millions of points across I have grouped together points that are "close enough" to be the same point. So I have moved ...
0
votes
0answers
39 views

Binding Custom Markers with base layer : leaflet

Working with leaflet api where i have added a custom marker control... There also we can add multiple baseLayer and toggle between these layers.... Lately i was trying to bind the markers with this ...
1
vote
1answer
86 views

how to bound markers with base layers : leaflet

I been working with leaflet control and here i stuck for a while.... I have multiple base layers, and user can toggle between these layers. these layers have separate drawing controls. When i add ...
1
vote
2answers
667 views

Convert WKT to GeoJSON with leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a leaflet map on my website. I've found plenty of tutorials to doing this on ...
1
vote
1answer
80 views

How to show directions on the map?

I am using Mapbox, Leaflet. Via Mapbox Walking directions I create directions and save origin and destination markers coordinates; Then I want to show this created direction. So I do following: ...
0
votes
1answer
54 views

Set ZIndex of leaflet popup

I'd like to have my Leaflet popup (tooltip) such that it appears outside the bounding div of the map, rather than it being hidden once it hits the map border. I see zindex() as a tile layer method. ...
0
votes
1answer
42 views

Embedding a leaflet map onto a blog

I've created a leaflet map using maptiler. It's created a leaflet HTML file, which links to PNG images on my desktop and displays the image. How do I embed the map onto a blog such as tumblr?
0
votes
1answer
314 views

How to extract style data from DXF when converting to geoJSON

I am using ogr2ogr (GDAL) to convert DXF files (from autoCAD) to geoJSONS for usage inside Leaflet.js The issue is that a lot of information, like line stroke size and colors are not kept during the ...
2
votes
1answer
51 views

Leaflet marker is not displaying

I am currently having slight problem on displaying marker in the leaflet. I have used the following codes on displaying marker and map, however the map is displaying flawlessly but the marker is ...
0
votes
1answer
718 views

Add/Remove markers

I'm trying to add/remove markers to a leaflet map. I have 6 checkboxes, what i want is that when I check any of them show the points in the map, and when uncheck one of them the only to remove is the ...
0
votes
0answers
105 views

Adding additional data to R maps - package data

Is there a way to add data to additional_data result set obtained from below line of code from R maps package? additional_data <- map('county', 'iowa', fill = TRUE, col = palette()) Above ...
0
votes
1answer
441 views

How to use leaflet-search for a geojson feature property?

I'm trying to use the leaflet-search plugin to search for a specific geojson property (i.e. 'Name'). The trick part of this is I want to perform a search on a Geojson file thats loaded in via the ...
2
votes
1answer
186 views

Offline Map with mapnik: Tiles are vertically unaligned and randomly displayed (Leaflet + Tilecache + Mapnik + Postgis)

I'm new to maps and currently I am developing my first offline Map with OSM data. I have map data added to postgres via osm2pgsql and installed mapnik 2.2. For caching I have used tilecache with ...
0
votes
0answers
100 views

How to draw custom lines and animate markers on it : leaflet

Introduction: I am working with the leaflet api, i have implemented a script which will put marker on map(onClick) and animate marker to the position i have set..... Problem I have to ...
0
votes
0answers
33 views

Accessing Topojson features

I am having trouble with accessing the "density" property of my TopoJSON file. Basically I want to change the density property or add another property named "metric" in my properties and make the ...
0
votes
1answer
188 views

Get GeoJson feature by ID and zoom on entity

I have got a leaflet map with Geojson layers : I use jquery Autocomplete to search an entity by name or id, I have no problem with that. I need your help because I'm not able to refer to a specific ...
4
votes
2answers
951 views

Convert multi-layer DWG into several KML or geoJSON files (one per layer)

I have some big DWG files, with 5 to 50 layers, which I draw and geolocated using AutoCAD (with some external modules). I need to convert them to KML or geoJSON so that the JS library can load them ...
1
vote
2answers
2k views

Free tile provider for Leaflet

I'm using Leaflet for the maps of my website. So far I was using maps of Mapbox (they're cool), but they obviously charge for them for website with 100,000+ maps per month. I'm trying to find a ...
1
vote
1answer
73 views

Can you display data from a csv (or other file format) onto a GeoJSON popup?

All, I'm trying to display data from another file such as a csv into a GeoJSON popup window. So far I know I can match the data using a nested for loop with a common id between the two files, but I'm ...
0
votes
1answer
526 views

How to add layers and update layer control dynamically : leaflet

Introduction I am working with the lealflet api, where user can draw shapes to map(image)... Initially the layer control(handling 1 layer) is added for base map using imageoverlay...... ...
1
vote
0answers
65 views

Count Tiles loaded from MBTiles

I have created a MBTiles file from Tilemill and I am visualizing it through php MBTiles server. Its working fine. Now I want to count the loaded tiles and store it to a database. In a simple word I ...
0
votes
1answer
164 views

Leaflet GeoJSON style function feature only colors one GeoJSON feature

I need to style every feature differently that I pull from a GeoJSON file. However this anonymous style function only changes the style on the first feature it comes across and stops. I am new to ...
0
votes
3answers
232 views

Disable leaflet layer check box in a layer control w/ zoom

I would like to have layers listed in my layer control, but have their check boxes disabled when zoomed out beyond a certain level. I am asking the same question that is found here, but with Leaflet ...
0
votes
1answer
296 views

Leaflet Marker Cluster from GeoJSON

I've created marker cluster in this example and now I want to show the same thing with data from GeoJSON, but it doesn't work. I'm trying to reproduce same situation in this example, but marker ...
2
votes
2answers
2k views

Take data (points) from MySQL to Leaflet Map using PHP and Ajax

I have records with lat and lngs in a MySQL database and I want to add them to a Leaflet map as markers. I have tried a couple of methods but none seem to work. When the webpage opens the map doesn't ...