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

learn more… | top users | synonyms

2
votes
1answer
1k views

leaflet show miles/kilometers

Googlemaps shows you how large an area is on a map by showing a small bar with the number of miles/kilometers at the bottem left. Does leaflet also support this somehow? I do not see it listed in ...
2
votes
1answer
2k views

Disable leaflet interaction temporary

How can I temporary disable zoming/draging the Mapview in Leaflet.js Tried so many ways but without any luck. It's important to make it temporary and I also need the option to enable again.
1
vote
1answer
737 views

create polylines with different colors in leaflet

I have one function which creates poly line & adds that polyline to map function makeRoute(e) { if(pointsSelection.length > 0) { pointsSelection.push(e.target.getLatLng()); ...
4
votes
1answer
2k views

leaflet geojson coordinate problem

I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on. My coordinates are: 52.23943, 4.97599. They work correct with ...
5
votes
2answers
197 views

Simplest way to make web maps with lots of shapes

I have some computed data about US Census blocks. I'd like to make a web map to display that data. I've searched around and found various tools, but I can't tell what is the simplest "lazy man's ...
6
votes
2answers
843 views

Tilemill Dynamic Tile Generation

I have recently used Tilemill and I wish to implement it for dynamic tile rendering.As I've seen an CartoDB doing in cloud system,they can query & generate dynamic tile for request with UTFGrid. ...
2
votes
1answer
1k views

select two markers & draw line between them in leaflet

I am very much new to leaflet. I have multiple markers plotted on my map in leaflet. now I have to draw line between two markers when I select them. Can any one help in doing this.
-1
votes
2answers
1k views

Adding the draw control in Leaflet

I'm trying to add the Draw Control availble in with the Leaflet.Draw Plugin I've downloaded the code and stored in htdocs and point my page towards the js and css libraries needed. The page loads ok ...
1
vote
1answer
772 views

leaflet layerGroup is rendered behind baselayer

I have several baselayers and overlays. Everything is fine except the lauerGroup is rendered behind the baselayer. First I define the baselayers and add them to a 'baselayer' variable. // base ...
-1
votes
1answer
243 views

How to properly use PostGIS with Maps

First time using PostGIS in an app. Target: - Get Heat Map of customers from address table using leaflet.js and heatmap.js Have DB called store_dev. Installed OSM Bright from Mapbox in it. Have a ...
0
votes
1answer
651 views

Geojson multipolygon doesn't work with Leaflet bindPopup?

I have polygon and multipolygon data in Geojson format and when I try to bind popup for polygon, it works perfectly, and when I try to bind it for multipolygon, it doesn't work. Is that some Leaflet ...
1
vote
2answers
245 views

converted SHP to geoJSON - how to put this on OSM map?

I'm a beginner at this. I converted a shapefile to a .js file but I am having trouble adding this data to a map using leaflet. The osmscarb.js: var osmscarb = { "type": "FeatureCollection", ...
5
votes
1answer
2k views

Leaflet and EPSG 4326 Projections

UPDATE: LEAFLET fixed support for EPSG 4326 (LL84) in the latest betas: https://github.com/Leaflet/Leaflet/issues/1207 Leaflet says it supports EPSG 4326 (Plate Carree, aka ll84) projections. I think ...
2
votes
2answers
549 views

Do the recent developments in the Google Maps API replace necessity of OpenLayers?

I think the main drawback of the Google Maps API is that we can't add our own vector data or raster imagery as one of the layers in the map. Is this correct? Or is there any alternative in the Google ...
2
votes
1answer
345 views

How to create a radius search in Leaflet

My objective is to create a radius search tools using Leaflet API. It will behave like how many POIs within the radius from a given point. Any tutorial or any blog forum link will be helpful to me. ...
2
votes
0answers
763 views

Projecting point in Leaflet from EPSG 900913 (same as 3857) to EPSG 2232 with proj4js returning unexpected results

I have a leaflet map from which I want to be able to query an api that accepts x y values in EPSG 2232 as inputs. Leaflet doesn't handle point transformations like Open Layers does so I am trying to ...
1
vote
2answers
3k views

How to open popup menu on right click in Leaflet

I want to open a popup menu list on right click with Leaflet map. I have tried the ContextMenu of leaflet but couldn't do it. Here is the sort of code I used. map.on('contextmenu', L.popup() ...
3
votes
1answer
3k views

CloudMade Routing with Leaflet: route is not displayed

I am trying to consume the CloudMade routing API using Leaflet. So far, I have managed to pass points and receive a response, and parse that response into an array of points. The array of points is ...
2
votes
1answer
605 views

How to render points from CartoDB with Leaflet and Leaflet Vector Layers?

I have a table in CartoDB containing some points. I want to render these points dynamically with Leaflet. There is cartodb.js for such tasks, but it does not support full customization of Tooltips, as ...
1
vote
2answers
2k views

Leaflet with EPSG4326 Tile Layer (using maptiler.org)

I have successfully been using Klokan Petr Pridal's MapTiler (http://maptiler.org ) to take GeoTiff files and create TMS tile pyramids for Leaflet (option #1 which projects to EPSG3857, also called ...
1
vote
1answer
179 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
1
vote
0answers
2k views

Having issues getting Leaflet “L.tileLayer.wms” to display Geoserver WMS data

I've set up Geoserver and WMS capabilities to host some weather data files (satellite data for example). Here's an example file: ...
3
votes
1answer
770 views

How to avoid corrupt geometries when translating between TopoJSON and GeoJSON?

I'm trying to display some geojson vector features on a leaflet map. The size of my GeoJSON is too big (25.4mb of data, 8.47mb gzipped), so I'm trying to use a TopoJSON format to reduce the size ...
0
votes
1answer
276 views

tools for sorting/filtering based on map state

Im about to embark on a project that list restaurants on a map. Id be grateful to find out what the best tools for the job are? The restaurants will be in a list beneath a map. The list will be ...
2
votes
1answer
764 views

GeoServer Callback Function Undefinded

Any idea why the function loadThis() comes back as undefined? I've tried adding jsonp: false which doesn't help either. The json object is returned properly, I can view it in FireBug, but I can't get ...
1
vote
0answers
105 views

Leaflet Call to GeoServer for GeoJson [duplicate]

Possible Duplicate: GeoServer Callback Function Undefinded I've gotten this far by following examples mentioned below, but I'm stuck. The URL returns the GeoJson file but it isn't getting ...
1
vote
3answers
944 views

Add TileCache Schema Layer to Leaflet Map

I am trying to get Leaflet to display a TileCache Schema tileset. One example: http://example.com/tiles/Admin/06/000/000/357/000/000/158.png As far as I can tell, Leaflet only supports TMS style ...
4
votes
1answer
1k views

Does Leaflet has option for scale dependent layers?

Is it possible to show layers with Leaflet depending on scaling? For example not show counties until zoom level reaches 10. Thanks.
3
votes
1answer
880 views

Leaflet WMTS layer

I would like to start using Leaflet instead of OpenLayers, but I can't find a way to load WMTS layer into the map. Is that possible with Leaflet, or do I have to stick with OL? I haven't found ...
8
votes
4answers
1k views

GeoJSON too bulky - what to do?

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
1
vote
1answer
648 views

Slow tiles generation for leaflet js

I am currently trying to use leaflet to display images (jpeg or png) instead of maps, I have followed the instructions on this blog post to create the tiles using gdal2tiles.py here is the code we ...
1
vote
2answers
534 views

How to use Leaflet marker clustering with image map only?

I have image map of one state, where I would like to put about 100 markers. Is it possible to use only one image map instead of CloudMade tiles Leaflet usually uses? So, I need only that image to be ...
3
votes
1answer
3k views

How to set up a layer control using Leaflet?

I have been working on a mapping application using Leaflet. I am using a WMS on Geoserver to get my layers, which are overlaid on a cloudmade basemap. I tried to use the layer control on my map by ...
2
votes
2answers
888 views

UTM Grid as a Layer with Leaflet

How can I display a UTM Grid as a layer with Leaflet? Search a way to embed a OpenStreetMap map with Leaflet in a website. Particularity. I want to display a UTM Grid as a Layer. In addition, lower ...
3
votes
1answer
715 views

reusing cached tiles with leaflet, mbtiles and mbtiles-php

I am using Leaflet and infostream's fork of mbtiles-php to serve MBTiles stored on my server. I'm using a Leaflet layer group (and a layer control) to serve two MBTiles files. When I toggle between ...
2
votes
1answer
583 views

How to keep bound popups from opening on [click]?

I am working on a map application which creates and binds popups on markers and polyline objects. The popups are created and bound lazily, i.e. ad-hoc when a user clicks on a specific object. The ...
4
votes
2answers
620 views

binding nested arrays as geojson popups in leaflet

I am struggling with geojson popups in leaflet.js I have nested arrays as properties for my features - an example would be counts of fish caught at a location (not my actual project data!) ...
3
votes
1answer
162 views

How to set up a maximal zoom for polygons in Leaflet?

How to set up a maximal zoom for some layer, for example state polygons? I need that my US polygons which represent states have maxZoom 6, and when zoomed higher than 6, that US counties show up ...
2
votes
0answers
754 views

Problem with multipolygon in Leaflet

I'm using Leaflet L.Polygon, but for some reason there's only blank site. Here's my code: var map = L.map('map').setView([37.8, -96], 4); var cloudmade = ...
7
votes
1answer
4k views

What is the default projection in Leaflet?

I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so ...
16
votes
3answers
3k views

Database for offline slippy map tiles

I currently have an offline HTML5 map application (built on Leaflet & KendoUI with custom additions) that has an app manifest and works fine on multiple platforms. However, I am hesitant to use ...
9
votes
3answers
1k views

Chart inside pop up window in Javascript

How to show a chart inside pop up window? I'm using Leaflet JS, which has support for raphael plugin http://dynmeth.github.com/RaphaelLayer/. Is it possible to create a div inside popup window? I was ...
1
vote
1answer
418 views

leaflet: Zooming a tile cache

I have a NASA BlueMarble tile layer that goes from zoom factors 0-8. I when I go to zoom level 9, I do see a momentary scaling to 9 (stretching pixels). But then, as expected, I get the errorTileUrl. ...
6
votes
2answers
2k views

Leaflet / Google Map baselayer / markers not visible

New to Leaflet, currently trying to migrate a project from native Google Maps to Leaflet; having been drawn to Leaflet by the layer management and options of using better 'roadmap' style basemaps. ...
1
vote
1answer
330 views

Is it possible to use Leaflet, PostGIS and PGRouting for web mapping?

I am newbie at Open Source GIS. I have already create a web mapping using custom tiles and leaflet. I have used my my own database. Tilemill was used to create the tiles and leaflet was used to ...
4
votes
1answer
506 views

Existing ArcGIS Rest Services - What platform to use for building mapping application?

I have clients that have an existing ArcGIS Server. Map layers are published as rest services and I am going to build a mapping application that displays their datasets. Functionality should include ...
1
vote
1answer
501 views

Is it possible to show migration arrows on Leaflet map?

I need to develop Leaflet map which will show the whole world. Also, I need to draw some arrows which will show paths of migrations in the world. The important thing to say that those arrows need to ...
10
votes
3answers
1k views

Leaflet: how to draw curved lines?

So, I'm trying to draw curved lines in my application which is based on a Leaflet map. As far as I know Leaflet does not support drawing curved lines at the moment, so my question is really more ...
1
vote
2answers
353 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 ...
1
vote
0answers
318 views

Raster Over Layer in Leaflet from GeoServer

I want to add a raster over layer onto the base layer and the raster layer is published by a Geoserver WMS. I set the raster layer's geographic coordinate system as the same as the cloudmate tiles. ...