Advertisement
Guest User

YMap

a guest
Jul 16th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ymaps.ready(init);
  2. function init(){
  3.     map = new ymaps.Map ("ymap", {
  4.         center: [55.784970, 37.661290],
  5.         zoom: 17
  6.     });
  7.  
  8.     map.controls.add('mapTools');
  9.     map.controls.add('typeSelector');
  10.     map.controls.add('zoomControl');
  11.     map.controls.add('scaleLine');
  12.  
  13.     var placemark = new ymaps.Placemark(
  14.         [55.784970, 37.661290],
  15.         {},
  16.         {
  17.         iconImageHref: '/images/flower.png',
  18.         iconImageSize: [53, 82],
  19.         iconImageOffset: [-40, -68]
  20.         }
  21.     );
  22.     map.geoObjects.add(placemark);
  23.  
  24.     var polyline = new ymaps.Polyline([
  25.         [ 55.779900, 37.665900 ],
  26.         [ 55.779800, 37.665600 ],
  27.         [ 55.780430, 37.664832 ],
  28.         [ 55.782012, 37.663543 ],
  29.         [ 55.783024, 37.662811 ],
  30.         [ 55.783712, 37.662043 ],
  31.         [ 55.784730, 37.660764 ],
  32.         [ 55.784858, 37.661000 ]
  33.     ],
  34.         {},
  35.         {
  36.         strokeColor: '#467e41',
  37.         strokeWidth: 6,
  38.         strokeStyle: 'solid',
  39.         strokeOpacity: 0.7
  40.     });
  41.     map.geoObjects.add(polyline);
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement