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.

Leaflet will become even better if you add …

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. Method to return the shortest path between A and B given an array of coords.

    Given an array of coords and two Points, return the shortest path from point A to point B using a minimal spanning tree created from the array parameter.

    The return value would be an array of coords, in order, that represent the vectors that must be taken to achieve the shortest path.

    This method would be useful for graphing, routing on maps that do not use real world geography, or maps have no real road data.

    6 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
    • linejoin and linecap

      Give the ability to set the stroke-linejoin and stroke-linecap in the L.Path options for more customization (keeping the "round" as default).

      5 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
      • You need to do like php documentation

        Need to add a list of examples after each function so people can add their ways of using your program. Php does this. One of the reasons I like using PHP. Usually I can go to the documentation and find an example of what I want to do in about 5 minutes.

        5 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
        • Having a little problem on firefox

          Hi, I am working on a project using leaflet and I need to draw divMarkers on the map, everything went well until I test my web solution on Firefox, the performance went donw the hill using this specific browser, on the rest of the browsers it went very weel even with a lot of divMarkers. Maybe this could help: wen I see the console on Firefox it says something about a parsing error for the z-index property of the markers.

          5 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
          • Make it more obvious how to delete a marker

            It is not obvious at all that a marker should be deleted from the map using removeLayer.

            5 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)
              You have left! (?) (thinking…)
            • Track the number of times each pin is clicked

              It would be nice to track (possibly to a database or other page hit counter) each time a marker is clicked. With total number of clicks, we could know which locations have the most public interest.

              4 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)
                You have left! (?) (thinking…)
              • leaflet marker click and doubleclick not working in firefox

                I have used awesome merker javascript with leaflet and added click and double click event

                var Lmarker = L.marker([Stations[i].Y, Stations[i].X], {
                icon: L.AwesomeMarkers.icon({
                icon: 'circle',
                prefix: 'fa',
                iconColor: 'red',
                markerSize: '15px'
                })

                Lmarker.on('click', onMarkerMouseClick);

                Lmarker.on('dblclick', onMapMarkerDoubleClick);

                double click event is not working in firefox. Please help if anyone has used both event.

                4 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                • to load rastre picture

                  to load ready-made tiles in jpg/png, e.g. we have building plan in one picture > 40mpix or cut tiles like ../{x}/{y}/{z}

                  4 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                  • 508 compliance

                    Add section 508 compliance

                    4 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                    • getPopup() and getIcon() in the API.

                      Our live data on the map would be much easier to deal with if we could check the icon of a given marker, then we could write more efficient js to update the icons as we need to. We have multiple icons in a track drawn on the map that we need to update. We'd like to be able to test for the presence of our custom icons on specific markers.

                      4 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                      • Update popup content without adding new DOM nodes

                        Is there a way to access//change the DOM object of a marker popup ?
                        It would be interesting to change its content without having to popup.setContent("") - which I suppose it would remove the previous nodes and add the new ones again.

                        In my current "issue", the popup information is composed by a quite heavy DOM and I just need to change a specific text inside this DOM group, with the setContent(), I can just reload the whole DOM instead.

                        4 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                        • scrollwheelZoomOffset just, like keyboardZoomOffset

                          I am trying out the new leaflet version with fractional zoom. I can now set the zoom level to for example 12.5. That is perfect. And when enabling the keyboard (+ and - keys) for zooming, I can also set the keyboardZoomOffset. When I set it to 0.5 and press the + key, the new zoom level will be 13.0.
                          Unfortunately, this option is not available for scrolling with the mouse wheel. The delta used (calculated) there is always a whole number (1 in my case). This step is too big for our application. I would like to have the…

                          4 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            1 comment  ·  Admin →
                          • Get polygon SVG path function.

                            Currently I draw the polygon from an array of coordinates on to the map, then once rendered, extract the svg paths and remove the map, create a new SVG element and add the path attribute previously recorded to have a polygon rendered on any background - not just a map.

                            Curious as to if it is possible to have a function to convert my polygon to an SVG path without rendering it on the map.

                            4 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                            • Ошибка

                              В новой версии не получается добавить полигоны поверх ImageOverlay.

                              4 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                              • map or layer can be rotated or set angle

                                i think leaflet may has a feature that map or layer can be rotated or set angle

                                4 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                • Tutorial Adding Image Overlay

                                  I would like to see a tutorial of how to add an imagery layer to a map.

                                  4 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                  • NOTHING! Keep it smple!!!

                                    The reason I used Leaflet was for it's simplicity and very small size. This must always be maintained. I want my websites to be as quick as possible which means keeping code to a minimum.

                                    If you really need to add features, add them as plugins but ALWAYS keep a very simple, basic, LIGHTWEIGHT version!

                                    4 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                    • Image popup/modal

                                      Can I open a popup/modal with an image from a marker in Leaflet? What I mean is when you have an open marker in it you have some details ( some names or address ) and a link/button and when you click the link/button it will open a popup/modal with an image. Can you give me some examples from the net or directions for this? Thanks.

                                      4 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        1 comment  ·  Admin →
                                      • Back to Top table of contents item for documentation

                                        Often is the case that a user does not know exactly what part of the documentation they wish to view. Currently, this involves selecting from the list at the top of the page, navigating to the selection, determining if this is what is needed, if not returning to the top of the page (as this provides the view of all documentation entries) and then selecting again.

                                        This functionality isn't absolutely necessary however I think it would be a nicety that would be much appreciated. I know I have exhibited this behaviour while using the docs for my latest project.

                                        3 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                        • Broken URL in startup guide (404), needing API Key for first example

                                          On ... http://leafletjs.com/examples/quick-start.html
                                          Under "setting up map"
                                          You have a link on (get yours at CloudMade), the URL is to http://account.cloudmade.com/register which returns a 404 error, I can find no equivalent registration on their site. A link to other tile suppliers so I can switch it would have been useful

                                          3 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                          • Don't see your idea?

                                          Ideas and Suggestions for Leaflet

                                          Feedback and Knowledge Base