33 :: Creating custom markers using Leaflet

Well, I’m not sure how far I’ll get into tonight’s challenge but here goes. I’m going to create a leaflet generated map that uses a custom icon following the example that they have documented here.

But I don’t want just to follow their exact example.  I want to try to make an example of my own.  And so I thought I’d start thinking about one of my potential projects I was thinking on embarking: a bicycle map.  I thought it might be useful to have a map of bicycle parking spots of the city where I live – or at least the parts of the city where I already cycle.

And then I bogged down in choosing just the right icon for my map (thank you again, Noun Project) and then the unexpected challenge of figuring out how to add a shadow to said icon (thank you shadowmaker!) . And then I thought I should test whether jsfiddle could handle images hosted on another server, so I tested the Leaflet example first, and then started again on my map.

And I got it done. I just need to revisit my icon shadow and point settings.. and make a better example…

Leave a Reply

Your email address will not be published. Required fields are marked *