Advertisement
putnik

Untitled

Feb 24th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var cmUrl = 'http://{s}.tile.cloudmade.com/aad...03a/997/256/{z}/{x}/{y}.png';
  2. var cmAttr = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade';
  3. var map = new L.Map('map');
  4. map
  5.     .setView(new L.LatLng(59.222127, 39.876359), 15)
  6.     .addLayer(new L.TileLayer(cmUrl, { maxZoom: 18, attribution: cmAttr }));
  7.  
  8. var LeafIcon = L.Icon.extend({
  9.     iconUrl: 'http://api.oldvologda.ru/markers/mm_20_green.png',
  10.     shadowUrl: 'http://api.oldvologda.ru/markers/mm_20_shadow.png',
  11.     iconSize: new L.Point(12, 20),
  12.     shadowSize: new L.Point(22, 20),
  13.     iconAnchor: new L.Point(12, 20),
  14.     popupAnchor: new L.Point(0, 0)
  15. });
  16. var greenIcon = new LeafIcon();
  17.  
  18. map.addLayer(new L.Marker(new L.LatLng(59.220446, 39.880833), {icon: greenIcon}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement