Utilizing the Leaflet mini map library in a map application.

In this post I will talk about how I went on to implement Leaflet's mini-map interface on a map based application called bridge-troll.

So you can check out the project here.Its a map-based game that unlocks "troll" under bridges using open data.The mini - map library that I used in Norkart's Leaflet-MiniMap that can be found here .

Implementing the mini - map was not easy and after my use of the library , I did notice some bugs.
Firstly the websites example shows that the mini-map can be toggled using the 'ToggleDisplay' property.The example can be seen here .

As you can see that the example can toggle the mini-map but in my example the toggle button does not show up.
No toggle button
This problem is already filed as an issue in the repository which can be found here . I did reply on this issue with example pictures.

This problem really makes it hard for the mini-map to appear separated from the main map. 

So I will currently wait for the owner to reply with an answer regarding this issue.








I am currently trying to load markers in the mini-map itself and I am following this example.
I am making the layers interchangeable and add it as a 'LayerGroup' but it still needs a lot of tweaking.
A sample of the mini map set-up is 

As I keep working on it I will post another blog on this update.If anyone is interested in helping me out the codebase is here .





Comments

Popular posts from this blog

First Open Source Contribution - debugger.html

Fixing issues in debugger.html.