Ideas and Suggestions for Leaflet
Leaflet UserVoice is a place for you to show support for your favorite feature and improvement suggestions for Leaflet.
- Please don’t add duplicates of existing ideas.
- Please don’t report issues with map data — they have nothing to do with Leaflet and will be declined. It uses OpenStreetMap on the website examples.
- If you need to report a bug, please use GitHub issues instead.
-
Map Rotation
Add the ability to rotate the map. Is very useful for mobile devices, for example in a GPS navigation app.
Maybe use hammerjs (if available) to allow the rotation of the map using two fingers on mobile devices.
OpenLayers3 supports this out of the box.
406 votes -
WFS layer
Support for WFS (Web Feature Service) layers: http://en.wikipedia.org/wiki/Web_Feature_Service
254 votesShould probably go into a plugin. Not for the core.
-
Documentation like jQuery
You should come up with an documentation like jQuery does, each function has a example on the page so we can get an understanding of how it is used than minimal examples on the Examples page.
206 votes -
Continuous zoom...
Any idea when this will be added? It would make Leaflet extremely powerful.
162 votes -
Layer order control
Ability to easily control the z-index order of tile and vector layers.
150 votesThe problem with this feature is that SVG doesn’t support z-index ordering by design. The only way to do this is to reorder DOM objects, which is quite inefficient if you want precise control. It’s even worse in Canvas where you have to rerender all layers in the correct order.
In the current master version, I’ve implemented bringToBack and bringToFront methods for both vector and tile layers which should satisfy most of the use cases here, but will continue designing a more sophisticated solution.
-
Marker Visibility Control
It would be nice to be able to control the visibility of a marker (hide/show) at either the marker or the layer level. I currently do this in both Google Map API and Openlayer Map API to allow the user to filter between different types of markers on the map.
123 votesTechnically, doing removeLayer and addLayer for hiding/showing markers has the same performance as hiding them with display = ‘none’, as addLayer only initializes the marker once and only appends it to the DOM on subsequent calls. So I don’t see much need to add such methods for individual markers.
However this would be a very useful feature for LayerGroup’s, where I could implement putting all layers from the same group into a div container to be able to hide them all at once for a considerable performance gain. This is definitely in the plans.
-
Marker Rotation
Ability to set rotation angle for markers.
112 votes -
Resolution and scale predefined for zoom level
OpenLayers has functionality that allows configure zoom levels by resolution or predefined scales. It is planned similar functionality in Leaflet?
109 votes -
Support for SVG Markers
Allow the use of inline SVG for markers in stead of a img tag. This would for example enable using libraries like d3js to generate little animated pie charts shown on the map.
102 votes -
Windows Phone
It would be great to have a mobile app for Windows Phone 7 and 8.
90 votes -
Number the markers
it sould be nice if we ware abble to number the markers, for a search around a point for exemple.
86 votesAgreed that’s a very useful feature, planned for one of the future versions.
-
Overlay opacity control
Add a slider control for adjusting the opacity of an overlay layer
82 votesLooks like a good candidate for a plugin.
-
TileLayer.GeoJSON
Support for tiled GeoJSON services.
77 votes -
Automatic International Dateline Handling
Handling dateline (180 meridian) crossing automatically, ala Google Maps. Polylines and polygons that cross the dateline are connected via the correct shortest route (e.g. polyline from Hawaii to Japan), are clamped to a max lon of 180/+180 and repeated as the map is panned through each iteration of the world.
70 votes -
Convert vectors layers to GeoJSON
In the class L.geoJson we have the method geometryToLayer ("Creates a layer from a given GeoJSON feature"). It would be great if some sort of inverse operation was available. That is, in the class L.Path there should be a method "layerToGeometry" which would create the essential geoJson data for the given Vector Layer (be it a Polyline/Polygon/Rectangle, a MultiPolyline/MultiPolygon, or a Circle/CircleMarker, for which the radius could be stored in the properties). The class L.Marker should have this as well.
59 votesDefinitely a useful feature, may be implemented as a plugin in the nearest future.
-
post example showing custom projection
It would be cool if one of the examples show the use of a custom projection. This could show how one could use leaflet to pan/zoom around a layer representing a simple image; or a local tile set (e.g. one city). This would also show how to create a map that doesn't wrap around the east/west.
59 votesThis will certainly be done after the current refactoring and simplification of Leaflet projection code is finished for 0.4 release. I see quite a high demand for this.
-
marker color
Add a set of standard colored markers to the package.
Now there's just blue, but being able to say 'marker-icon-red' in place of 'marker-icon' would be great.
(I have made th standard marker into 11 other colors, and happy to share them)52 votesWhile I’ll consider adding some more colored markers to the repo, you can currently generate your own markers similar to the default one as the SVG source for the icon is now included in the repo.
-
Secure WMS
Please add support to handle secure WMS with basic authentication.
49 votes -
draw icon with canvas
I want the size and content of icon should be depend of zoom.
same L.TileLayer.Canvas but for icon.
I think about something like:
var canvasMarker = new L.Marker.Canvas(<op>);
canvasMarker.drawIcon = function(canvas,zoom){
var context = canvas.getContext("2d");
context....// work here
}45 votes -
a gestureHandling option to L.Map
Google Maps JS has a gestureHandling option which can be set to 'none', 'greedy', 'cooperative' or 'auto'.
Currently, Leaflet only has a 'greedy' mode where moving with one finger pans the map.
But when Leaflet is used as part of a scrolling page, this one finger panning interferes with page scrolling.Google Maps' solution is to require two fingers to move the map when gestureHandling is 'cooperative'.
This would make Leaflet a no-brainer to embed in scrolling pages. I couldnt find plugins that enable this behaviour.
More: https://developers.google.com/maps/documentation/javascript/interaction
42 votes
- Don't see your idea?