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

learn more… | top users | synonyms (1)

1
vote
1answer
98 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
188 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
79 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
346 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
43 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
98 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
767 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
93 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
58 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
44 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
362 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
56 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
851 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
112 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
530 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
197 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
105 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
212 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
1k 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
76 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
622 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
68 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
184 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
284 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
351 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 ...
1
vote
2answers
237 views

Making Open Street Maps Transparent in Leaflet

Info: I have a local Open Street Maps Server which is serving tiles for Michigan, Indiana, Ohio, Illinois, and West Virginia. I also have a geoserver set up serving a wms layer containing states. ...
0
votes
0answers
39 views

MOBAC Osmdroid and Leaflet

I am having a lot of trouble creating a map for leaflet js. I am using Osmdroid zip. When I check a map example that works, the format (z,x,y) doesn't seem the same. I think there must be some ...
2
votes
0answers
155 views

Has anyone implemented the leaflet.shapefile plugin?

I'm trying to implement the leaflet.shapefile plugin to enable a user to upload a zipped shapefile and overlay it on my webmapping site as can be done in the demo version of the site. ...
0
votes
0answers
33 views

QGIS to Leaflet Projection Weirdness

I've been using the mmqgis tool to create a hex grid. It loads up in QGIS looking good, but when I save it as geojson and load it up in leaflet it gets stretched (see attached). It starts life as ...
0
votes
1answer
103 views

Adding WMS Layer Leaflet Trouble

The Problem: I'm pretty new to leaflet and I'm trying to add a outline of the states over my OSM layer via WMS. I've found several tutorials online, some directly from the leaflet website but haven't ...
1
vote
2answers
53 views

Loading JSON URL into 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 ...
2
votes
0answers
95 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 = ...
1
vote
2answers
147 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
1answer
81 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
188 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 ...
1
vote
1answer
70 views

Zooming into State

I am using R LeaftLet package to create a interactive choropleth of the US Map. Now my question I want both in one map itself but make zip code visible as I zoom in a state or double click on a ...
0
votes
1answer
36 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 ...
2
votes
1answer
301 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 ...
2
votes
1answer
133 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 ...
3
votes
1answer
1k 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 ...
2
votes
1answer
151 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
142 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
50 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
40 views

Can we set the latlng start point : leaflet

I am working with the leaflet api. I am 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 latlng(0,0) is at the ...
0
votes
0answers
70 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 ...
1
vote
1answer
104 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 ...