Leaflet.GooglyEyes
Add googly eyes to your Leaflet maps.
Inspired by "If countries had googly eyes".
Usage
Include the Leaflet.GooglyEyes.js
in your HTML:
<script src="Leaflet.GooglyEyes.js"></script>
Add a marker with L.Googly.icon
, using the default 50x24 icon:
new L.marker([50.97, 11.04], {icon: new L.Googly.icon()}).addTo(map)
Or with custom size options:
new L.marker([51.97, 11.04], {
icon: new L.Googly.icon({
iconSize: [100, 48],
iconAnchor: [50, 24],
popupAnchor: [0, -24],
className: 'googly'
})
}).addTo(map);
Demo
- Simple example
- GeoJSON example Attention: Might slow down your computer
License
- MIT
- Basic file structure and functions inspired by Leaflet.awesome-markers, MIT License
- Country boundaries converted and modified from Natural Earth, Public Domain