Jeroen van der Veen

Always keep developing

Tag: JavaScript

Creating a custom leaflet marker, part 2 – Making it more self-supported

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

map

Creating an animated leaflet marker with CSS transitions and sprites – Part 1

So for my first real dev post I thought I’ll do a write up on a little project I did a while back. Doing stuff on a map is a big chunk of the functionality for a lot of the applications we build. Handling large numbers of markers and mutating them is mostly part of that deal as well.

For the sake of legibility I’ll split this up in three parts:

Read More