Below you will find pages that utilize the taxonomy term “Leaflet”
Many Clickable Points on a Leaflet Map With Leaflet.glify
Problem
As seen in the post before we collected some 12.000 points which we want to display on a leaflet map. Every attempt to put that many points on one map failed. Firefox completely stopped working, chrome did a little bit better and stayed responsive, but that was not a solution at all.
Solution
I pretty much tried everything L.geoJSON layer with points and polygons.
Where polygons would have been a solution maybe, but you can not tell leaflet to just draw the corners of the polygons.
So I needed something else. In the #leaflet on freenode i was pointed to the
Leaflet.glify project.
Show routes to current geohash
The Plan
My geohashing alert2016-01-13 15:28-system at 123k.org shows the current geohash for my home graticule. The plan is to the nearest route which passes by.
Finding Something
As mentioned earlier I have all points i ever visited in a collection.
This collection holds a geospatial index. Therefore I can issue mongo queries with
the $nearSphere command. This command finds the first points from a given location.
So this just works. But what about other routes which may also be nice and just around the corner? We can select many points around the hash point and check which routes they’re on.