In this post I’ll discuss the Leaflet marker in more detail and give it some internal functionality. If you haven’t read the previous post you can check it out here.

If you’ve done previous work with Leaflet you’ve probably created some great viewmodels that have functionality to drive the markers. In my first attempts to create map based modules I just followed the regular tutorials and some freely available plugins from the Leaflet plugin repository. After some iterations on the functionality we had created a monstrous JavaScript file with lots and lots of methods driving the markers. Add to that the performance issues we found when creating and destroying large amounts of markers, so the time had come to restructure the code.

Read More