Mixedbredie's Ghosts
  • Home
  • Contact
Subscribe
Tagged

leaflet

A collection of 3 posts

Reprojecting Leaflet Coordinates
javascript

Reprojecting Leaflet Coordinates

Leaflet has a great little function that returns the coordinates of a point clicked on the map. var popup = L.popup(); function onMapClick(e) { popup .setLatLng(e.latlng) .setContent("You clicked the map at " + e.latlng.toString()) .openOn(map); } map.on('click', onMapClick); When the user clicks on

  • Ross McDonald
Ross McDonald Sep 15, 2015 • 2 min read
Legendary Leaflet Legends
leaflet

Legendary Leaflet Legends

I recently had a request to make some simple interactive web maps to show street lighting faults - columns gone "dark" - and marked parking bays on roads. Easy. Then, to make the maps a little nicer, I thought let's style the data using the available attributes. Some

  • Ross McDonald
Ross McDonald Sep 2, 2015 • 4 min read
embedding

Here's a little map I wrote

The code below is the code that generates the embedded map above. To embed the javascript and get the map to work you need to add the leaflet CSS files to the header of your theme. Go to Settings > Code injection and paste the link to the CSS into

  • Ross McDonald
Ross McDonald Jan 19, 2015 • 1 min read
Mixedbredie's Ghosts © 2023
Powered by Ghost