Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var LeafIcon = L.Icon.extend({
- options: {
- iconSize: [38, 95],
- shadowSize: [50, 64],
- iconAnchor: [22, 94],
- popupAnchor: [-3, -10]
- }
- });
- var greenIcon = new LeafIcon({iconUrl: 'http://leafletjs.com/docs/images/leaf-green.png'}),
- redIcon = new LeafIcon({iconUrl: 'http://leafletjs.com/docs/images/leaf-red.png'}),
- orangeIcon = new LeafIcon({iconUrl: 'http://leafletjs.com/docs/images/leaf-orange.png'});
- L.marker([51.5, -0.071], {icon: greenIcon}).bindPopup("<p>ok</p><p>tada</p>.").addTo(map);
- L.marker([51.5, -0.073], {icon: redIcon}).bindPopup("I am a red leaf.").addTo(map);
- L.marker([51.5, -0.076], {icon: orangeIcon}).bindPopup("I am an orange leaf.").addTo(map);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement