Mixedbredie's Ghosts
  • Home
  • Contact
Subscribe
Tagged

javascript

A collection of 2 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
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