ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
API §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä
           §¤§à§Ý§å§Ò§Ö§Ó §¶§Ö§Õ§à§â
           §²§Ñ§Ù§â§Ñ§Ò§à§ä§é§Ú§Ü §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä,
           fgolubev@yandex-team.ru




                                      1
http://beta-maps.yandex.ru
§®§à§Ø§ß§à §ã§Õ§Ö§Ý§Ñ§ä§î §Ò§Ö§ã§Ü§à§ß§Ö§é§ß§à§Ö §Ü§à§Ý§Ú§é§Ö§ã§ä§Ó§à §ã§Ö§â§Ó§Ú§ã§à§Ó,
§ß§Ñ§á§â§Ú§Þ§Ö§â:
?? §ã§ç§Ö§Þ§Ñ §á§â§à§Ö§Ù§Õ§Ñ (http://gazmanov.ru/contacts/)
?? §Ü§Ñ§â§ä§Ñ §ß§Ö§ã§Ü§à§Ý§î§Ü§Ú§ç §à§æ§Ú§ã§à§Ó (http://company.yandex.ru/)
?? ?§Ô§Õ§Ö §Ó§í§á§Ú§ä§î??, §Ò§Ý§Ú§Ø§Ñ§Û§ê§Ú§Û §Ò§Ñ§â (http://tyndr.ru/places/)
?? §á§à§â§ä§Ñ§Ý §Ô§à§â§à§Õ§Ñ/§à§Ò§Ý§Ñ§ã§ä§Ú (http://www.66.ru/)
?? §Ò§Ñ§Ù§Ñ §ß§Ö§Õ§Ó§Ú§Ø§Ú§Þ§à§ã§ä§Ú (http://www.cian.ru/)
?? §ã§à§Ò§í§ä§Ú§ñ §ß§Ñ §Ü§Ñ§â§ä§Ö (http://news.yandex.ru)
+ §Ó§Ñ§ê §ã§Ö§â§Ó§Ú§ã
API §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä ¡ª §ï§ä§à §ß§Ñ§Ò§à§â §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§à§Ó,
§á§à§Ù§Ó§à§Ý§ñ§ð§ë§Ú§Û §Ó§ã§ä§â§Ñ§Ú§Ó§Ñ§ä§î §Ü§Ñ§â§ä§í §Á§ß§Õ§Ö§Ü§ã§Ñ §ß§Ñ §Ó§Ñ§ê
§ã§Ñ§Û§ä.
§ª§ß§ã§ä§â§å§Þ§Ö§ß§ä§í API:
??   JavaScript API
??   Static API
??   §¤§Ö§à§Ü§à§Õ§Ö§â
??   YMapsML




                      5
§¥§Ý§ñ §â§Ñ§Ò§à§ä§í c API §ä§â§Ö§Ò§å§Ö§ä§ã§ñ §Ü§Ý§ð§é
??      §Ü§Ý§ð§é §á§â§Ú§Ó§ñ§Ù§Ñ§ß §Ü §Ú§Þ§Ö§ß§Ú §Õ§à§Þ§Ö§ß§Ñ
??     §Õ§Ý§ñ localhost §Ú 127.0.0.1 §á§à§Õ§à§Û§Õ§Ö§ä §Ý§ð§Ò§à§Û
     §Ü§Ý§ð§é
??      §â§Ñ§Ò§à§ä§Ñ§Ö§ä §Õ§Ý§ñ §á§à§Õ§Õ§à§Þ§Ö§ß§à§Ó
     §Ü§Ý§ð§é §Õ§Ý§ñ domen.ru §á§à§Õ§à§Û§Õ§Ö§ä §Ü www.domen.ru, blog.domen.ru

??      http://api.yandex.ru/maps/form.xml




                                                                6
JavaScript API
§Ò§Ú§Ò§Ý§Ú§à§ä§Ö§Ü§Ñ JavaScript §à§Ò§ì§Ö§Ü§ä§à§Ó
§ä§Ö§Ü§å§ë§Ñ§ñ §Ó§Ö§â§ã§Ú§ñ 1.0.1




                                 7
JavaScript API

    §±§à§Õ§Ü§Ý§ð§é§Ö§ß§Ú§Ö
    ?? §à§Ò§í§é§ß§Ñ§ñ §Ù§Ñ§Ô§â§å§Ù§Ü§Ñ
     <head>
      <script src=http://api-maps.yandex.ru/{§Ó§Ö§â§ã§Ú§ñ}/key={Api-§Ü§Ý§ð§é}/>
     </head>

    ?? §à§ä§Ý§à§Ø§Ö§ß§ß§Ñ§ñ §Ù§Ñ§Ô§â§å§Ù§Ü§Ñ
     <head>
      <script src=http://api-maps.yandex.ru/{§Ó§Ö§â§ã§Ú§ñ}/key={Api-§Ü§Ý§ð§é }&
    loadByRequire=1 />
     </head>
     ¡­
     YMaps.load(callback);




                                                                        8
JavaScript API

    §³§à§Ù§Õ§Ñ§ß§Ú§Ö §Ü§Ñ§â§ä§í
    1. §à§á§â§Ö§Õ§Ö§Ý§ñ§Ö§Þ §Ü§à§ß§ä§Ö§Û§ß§Ö§â §Ü§Ñ§â§ä§í
     <div id=quot;mapIDquot; style=quot;height:200px; width=200px; quot;>

    2. §ã§à§Ù§Õ§Ñ§Ö§Þ §Ü§Ñ§â§ä§å
     var map = new YMaps.Map(document.getElementById(quot;mapIDquot;));

    3. §Ú§ß§Ú§è§Ú§Ñ§Ý§Ú§Ù§Ú§â§å§Ö§Þ (§è§Ö§ß§ä§â, §Þ§Ñ§ã§ê§ä§Ñ§Ò, §ä§Ú§á §Ü§Ñ§â§ä§í):
     map.setCenter(
        new YMaps.GeoPoint(37.63, 55.75),      // §è§Ö§ß§ä§â
        10,                                    // §Þ§Ñ§ã§ê§ä§Ñ§Ò
        YMaps.MapType.MAP                      // §ä§Ú§á §Ü§Ñ§â§ä§í
     );



                                                                  9
JavaScript API

    §£§ã§ä§â§à§Ö§ß§ß§í§Ö §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§Ú §Ü§Ñ§â§ä§í

    ?? §±§Ö§â§Ö§ä§Ñ§ã§Ü§Ú§Ó§Ñ§ß§Ú§Ö (Dragging)
    ?? §®§Ñ§ã§ê§ä§Ñ§Ò§Ú§â§à§Ó§Ñ§ß§Ú§Ö (ScrollZoom, DblClickZoom)
    ?? §£§í§Õ§Ö§Ý§Ö§ß§Ú§Ö §â§Ñ§Þ§Ü§à§Û (Magnifier)
    ?? §¤§à§â§ñ§é§Ú§Ö §Ü§Ý§Ñ§Ó§Ú§ê§Ú (HotKeys)
    ?? §­§Ú§ß§Ö§Û§Ü§Ñ (Ruler)

      map.enable{§£§à§Ù§Þ§à§Ø§ß§à§ã§ä§î}()    ->   map.enableRuler()
      map.disable{§£§à§Ù§Þ§à§Ø§ß§à§ã§ä§î}     ->   map.disableRuler()
      map.{§Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§î}Enabled()   ->   map.rulerEnabled()



                                                             10
JavaScript API

    §¿§Ý§Ö§Þ§Ö§ß§ä§í §å§á§â§Ñ§Ó§Ý§Ö§ß§Ú§ñ (Controls)
    ?? §¿§Ý§Ö§Þ§Ö§ß§ä §Þ§Ñ§ã§ê§ä§Ñ§Ò§Ú§â§à§Ó§Ñ§ß§Ú§ñ (Zoom, SmallZoom)

    ?? §°§Ò§Ù§à§â§ß§Ñ§ñ §Ü§Ñ§â§ä§Ñ (MiniMap)

    ?? §±§Ö§â§Ö§Ü§Ý§ð§é§Ñ§ä§Ö§Ý§î §ä§Ú§á§à§Ó (TypeControl)
      + §Ó§Ñ§ê§Ú §ä§Ú§á§í §Ü§Ñ§â§ä

    ?? §®§Ñ§ã§ê§ä§Ñ§Ò§ß§Ñ§ñ §Ý§Ú§ß§Ú§ñ (ScaleLine)

    ?? §±§Ñ§ß§Ö§Ý§î §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§à§Ó (ToolBar)
      + §Ó§Ñ§ê§Ú §Ü§ß§à§á§Ü§Ú

    + §Ó§Ñ§ê§Ú §ï§Ý§Ö§Þ§Ö§ß§ä§í §å§á§â§Ñ§Ó§Ý§Ö§ß§Ú§ñ (IControl).
      map.addControl(IControl, controlPosition)
      map.removeControl(IControl)

                                                   11
JavaScript API
                 ToolBar   TypeControl




Zoom




                 MiniMap                 ScaleLine   12
JavaScript API

    §°§Ò§ì§Ö§Ü§ä§í §ß§Ñ §Ü§Ñ§â§ä§Ö (Overlay)

    ?? §®§Ö§ä§Ü§Ú (Placemark)
    ?? §±§à§Ý§Ú§Ý§Ú§ß§Ú§Ú (Polyline)
    + §Ó§Ñ§ê§Ú §à§Ò§ì§Ö§Ü§ä§í (IOverlay)
    ?? §¤§â§å§á§á§Ú§â§à§Ó§Ü§Ñ §à§Ò§ì§Ö§Ü§ä§à§Ó (OverayGroup, GeoObjectCollection)
    ?? §µ§á§â§Ñ§Ó§Ý§Ö§ß§Ú§Ö §Ó§Ú§Õ§Ú§Þ§à§ã§ä§î§ð §à§Ò§ì§Ö§Ü§ä§à§Ó (ObjectManager)


      map.addOverlay(overlay)
      map.removeOverlay(overlay)



                                                                 13
JavaScript API

    §¯§Ñ§ã§ä§â§à§Û§Ü§Ñ §Ó§ß§Ö§ê§ß§Ö§Ô§à §Ó§Ú§Õ§Ñ §à§Ò§ì§Ö§Ü§ä§à§Ó
    ?? §º§Ñ§Ò§Ý§à§ß§í (Template)
    ?? §³§ä§Ú§Ý§Ú (Style)




                                       14
JavaScript API

    §º§Ñ§Ò§Ý§à§ß§í (Template)
    ?? html §â§Ñ§Ù§Þ§Ö§ä§Ü§Ñ §ã§à §Ó§ã§ä§Ñ§Ó§Ü§Ñ§Þ§Ú §Õ§Ñ§ß§ß§í§ç
      var htmlText = quot;<h2><img src=/karmatsky/yandex-maps-api-1019729/quot;$[style.iconStyle.href] quot;/>$[name]</h2> 
      <p>$[description|§Ò§Ö§Ù §Ü§à§Þ§Þ§Ö§ß§ä§Ñ§â§Ú§Ö§Ó]</p>quot;

    ?? §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§î §Õ§à§ã§ä§å§á§Ñ §á§à §Ü§Ý§ð§é§å
      YMaps.Templates.add(quot;my#templatequot;, new YMaps.Template(htmlText));
      ¡­
      var template = YMaps.Templates.get(quot;my#templatequot;);

    + §á§Ö§â§Ö§à§á§â§Ö§Õ§Ö§Ý§Ú§Ó §Þ§Ö§ä§à§Õ build §Þ§à§Ø§ß§à §â§Ö§Ñ§Ý§Ú§Ù§à§Ó§Ñ§ä§î
    §ã§Ó§à§ð §ê§Ñ§Ò§Ý§à§ß§Ú§Ù§Ñ§è§Ú§ð




                                                                                  15
JavaScript API

    §³§ä§Ú§Ý§Ú (Style)
    ?? §ß§Ñ§Ò§à§â §á§â§Ö§Õ§à§á§â§Ö§Õ§Ö§Ý§Ö§ß§ß§í§ç §ã§ä§Ú§Ý§Ö§Û
      quot;default#whitePoint¡° (   ) , quot;default#greenPoint¡° (   ), ¡­

    ?? §Þ§Ö§ç§Ñ§ß§Ú§Ù§Þ §ß§Ñ§ã§Ý§Ö§Õ§à§Ó§Ñ§ß§Ú§ñ
      §Ù§ß§Ñ§é§Ö§ß§Ú§ñ §Ü§à§ä§à§â§í§ç §ß§Ö§ä §Ó §Õ§à§é§Ö§â§ß§Ö§Þ §ã§ä§Ú§Ý§Ö, §Ú§ë§å§ä§ã§ñ §Ó §â§à§Õ§Ú§ä§Ö§Ý§î§ã§Ü§à§Þ

    ?? §á§â§Ú§Ó§ñ§Ù§Ü§Ñ §ê§Ñ§Ò§Ý§à§ß§à§Ó
      style.balloonContentStyle.setTemplate(quot;my#templatequot;);

    ?? §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§î §Õ§à§ã§ä§å§á§Ñ §á§à §Ü§Ý§ð§é§å




                                                                     16
JavaScript API

    §±§â§Ú§Þ§Ö§â




                 17
Static API
§Ó§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä §Ú§Ù§à§Ò§â§Ñ§Ø§Ö§ß§Ú§Ö §ã §Ü§Ñ§â§ä§à§Û §Ó §à§ä§Ó§Ö§ä
§ß§Ñ HTTP-§Ù§Ñ§á§â§à§ã, §á§Ö§â§Ö§Õ§Ñ§Ó§Ñ§Ö§Þ§í§Û §á§à§ã§â§Ö§Õ§ã§ä§Ó§à§Þ
URL §ã §á§Ñ§â§Ñ§Þ§Ö§ä§â§Ñ§Þ§Ú




                                           18
Static API

    §°§ã§à§Ò§Ö§ß§ß§à§ã§ä§Ú
    ?? §Þ§Ö§ß§î§ê§Ú§Û §à§Ò§ì§Ö§Þ §Ù§Ñ§Ô§â§å§Ø§Ñ§Ö§Þ§í§ç §Õ§Ñ§ß§ß§í§ç
    ?? §à§ä§ã§å§ä§ã§ä§Ó§Ú§Ö JavaScript
    ?? §Þ§Ñ§Ü§ã§Ú§Þ§Ñ§Ý§î§ß§Ñ§ñ §á§â§à§ã§ä§à§ä§Ñ
    §ª§Õ§Ö§Ñ§Ý§î§ß§à §Õ§Ý§ñ
    ?? §Ó§Ö§â§ã§Ú§Û §Õ§Ý§ñ §á§Ö§é§Ñ§ä§Ú
    ?? §á§â§à§ã§ä§í§ç §ã§ç§Ö§Þ §á§â§à§Ö§Ù§Õ§Ñ
    ?? §Ü§Ñ§â§ä§Ú§ß§à§Ü §Ó §Ò§Ý§à§Ô
    ?? §Ü§Ñ§â§ä §ß§Ñ §å§ã§ä§â§à§Û§ã§ä§Ó§Ñ§ç §ã §à§Ô§â§Ñ§ß§Ú§é§Ö§ß§ß§à§Û §á§à§Õ§Õ§Ö§â§Ø§Ü§à§Û
    JavaScript

                                                       19
Static API

    §±§Ñ§â§Ñ§Þ§Ö§ä§â§í
    ?? §â§Ñ§Ù§Þ§Ö§â §Ü§Ñ§â§ä§í (size)
      §Þ§Ñ§Ü§ã§Ú§Þ§å§Þ 600 §ß§Ñ 450 §á§Ú§Ü§ã§Ö§Ý§Ö§Û

    ?? §à§Ò§Ý§Ñ§ã§ä§î §Ü§Ñ§â§ä§í
    ?? §è§Ö§ß§ä§â (ll, spn)
    ?? §Þ§Ñ§ã§ê§ä§Ñ§Ò (z)
    ?? §ä§Ú§á §Ü§Ñ§â§ä§í (l)

    ?? §à§Ò§ì§Ö§Ü§ä§í §ß§Ñ §Ü§Ñ§â§ä§Ö
    ?? §Þ§Ö§ä§Ü§Ú (pm)
    ?? §á§à§Ý§Ú§Ý§Ú§ß§Ú§Ú (pl)



                                     20
Static API

    §±§â§Ú§Þ§Ö§â
    http://static-maps.yandex.ru/1.x/? key={Api-§Ü§Ý§ð§é}&
        size=600,300&                           // §â§Ñ§Ù§Þ§Ö§â §Ü§Ñ§â§ä§í
        l=map&                                  // §ä§Ú§á §Ü§Ñ§â§ä§í
        pl=37.65,55.74,37.66,55.75&             // §á§à§Ý§Ú§Ý§Ú§ß§Ú§ñ
        pt=37.65,55.74 ~37.66,55.75,pmblm1 // §Þ§Ö§ä§Ü§Ú




                                                                  21
§¤§Ö§à§Ü§à§Õ§Ö§â
§á§à§Ù§Ó§à§Ý§ñ§Ö§ä §à§á§â§Ö§Õ§Ö§Ý§ñ§ä§î §Ü§à§à§â§Õ§Ú§ß§Ñ§ä§í §Ú §á§à§Ý§å§é§Ñ§ä§î
  §ã§Ó§Ö§Õ§Ö§ß§Ú§ñ §à §Ô§Ö§à§Ô§â§Ñ§æ§Ú§é§Ö§ã§Ü§à§Þ §à§Ò§ì§Ö§Ü§ä§Ö §á§à §Ö§Ô§à
  §ß§Ñ§Ù§Ó§Ñ§ß§Ú§ð §Ú§Ý§Ú §Ñ§Õ§â§Ö§ã§å




                                             22
§¤§Ö§à§Ü§à§Õ§Ö§â

   §°§ã§à§Ò§Ö§ß§ß§à§ã§ä§Ú
   ?? §Ú§ã§á§â§Ñ§Ó§Ý§Ö§ß§Ú§Ö §à§á§Ö§é§Ñ§ä§à§Ü
   ?? §à§ä§Õ§Ñ§Ö§ä §Ó§ã§Ö §ß§Ñ§Û§Õ§Ö§ß§ß§à§Ö
   ?? §à§ä§Ó§Ö§ä§í §Ó §á§à§â§ñ§Õ§Ü§Ö §â§Ö§Ý§Ö§Ó§Ñ§ß§ä§ß§à§ã§ä§Ú
   §¯§Ñ§ã§ä§â§à§Û§Ü§Ú
   ?? §Ù§Ñ§Õ§Ñ§ß§Ú§Ö §à§Ò§Ý§Ñ§ã§ä§Ú §á§à§Ú§ã§Ü§Ñ (ll, spn)
   ?? §à§Ô§â§Ñ§ß§Ú§é§Ö§ß§Ú§Ö §Ü§à§Ý§Ú§é§Ö§ã§ä§Ó§Ñ §â§Ö§Ù§å§Ý§î§ä§Ñ§ä§à§Ó (result)
   ?? §á§à§ã§ä§â§Ñ§ß§Ú§é§ß§í§Û §Ó§í§Ó§à§Õ (result, skip)


                                                    23
§¤§Ö§à§Ü§à§Õ§Ö§â

   §Ú§Ù§à§Ò§â§Ñ§Ø§Ö§ß§Ú§Ö §á§à§Ú§ã§Ü§à§Ó§à§Û §Ó§í§Õ§Ñ§é§Ú §Ò§Ö§ä§í




                                       24
§¤§Ö§à§Ü§à§Õ§Ö§â

   §ª§ß§ä§Ö§â§æ§Ö§Û§ã§í
   ??     JavaScript API (YMaps.Geocoder)
        §Ó§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä §ß§Ñ§Ò§à§â §Þ§Ö§ä§à§Ü
        var geocoder = new YMaps.Geocoder(quot;§®§à§ã§Ü§Ó§Ñquot;, options);
        map.addOverlay(geocoder);

   ??     http §á§â§à§ä§à§Ü§à§Ý (http://geocode-maps.yandex.ru/)
        §Ó§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä YMapsML §Õ§à§Ü§å§Þ§Ö§ß§ä
        http://geocode-maps.yandex.ru/1.x/?geocode=§®§à§ã§Ü§Ó§Ñ&key=API-§Ü§Ý§ð§é




                                                                         25
§¤§Ö§à§Ü§à§Õ§Ö§â
   §¶§â§Ñ§Ô§Þ§Ö§ß§ä §à§ä§Ó§Ö§ä§Ñ §Ô§Ö§à§Ü§à§Õ§Ö§â§Ñ
   <featureMember><GeoObject>
     <metaDataProperty><GeocoderMetaData>
        <kind>locality</kind>
        <text>§²§à§ã§ã§Ú§ñ, §®§à§ã§Ü§Ó§Ñ</text>
        <precision>other</precision>
        <AddressDetails xmlns=quot;urn:oasis:names:tc:ciq:xsdschema:xAL:2.0quot;>
         <Country>
           <CountryName>§²§à§ã§ã§Ú§ñ</CountryName>
           <Locality>
            <LocalityName>§®§à§ã§Ü§Ó§Ñ</LocalityName>
           </Locality>
         </Country>
        </AddressDetails>
      </GeocoderMetaData></metaDataProperty>
     <boundedBy><Envelope>
        <lowerCorner>37.177964 55.436075</lowerCorner>
        <upperCorner>38.040472 56.068469</upperCorner>
      </Envelope></boundedBy>
     <Point><pos>37.609218 55.753559</pos></Point>
    </GeoObject></featureMember>
                                                                            26
YMapsML
(YMaps Markup Language) ¨C XML §ñ§Ù§í§Ü §à§á§Ú§ã§Ñ§ß§Ú§ñ
  §Ô§Ö§à§á§â§à§ã§ä§â§Ñ§ß§ã§ä§Ó§Ö§ß§ß§í§ç §Õ§Ñ§ß§ß§í§ç §Õ§Ý§ñ §à§ä§à§Ò§â§Ñ§Ø§Ö§ß§Ú§ñ
  §ã§â§Ö§Õ§ã§ä§Ó§Ñ§Þ§Ú §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä




                                               27
YMapsML

   YMapsML
   ??     xml-§æ§à§â§Þ§Ñ§ä §â§Ñ§Ò§à§ä§í §ã §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§Ñ§Þ§Ú API
   ??     §Õ§Ñ§ß§ß§í§Ö + §à§á§Ú§ã§Ñ§ß§Ú§Ö §à§ä§à§Ò§â§Ñ§Ø§Ö§ß§Ú§ñ
   ??     §Ò§Ñ§Ù§Ú§â§å§Ö§ä§ã§ñ §ß§Ñ §ã§ä§Ñ§ß§Õ§Ñ§â§ä§Ö GML (Geography ML)
        §Õ§à§Ü§å§Þ§Ö§ß§ä§í §Þ§à§Ø§ß§à §á§â§à§ã§Þ§Ñ§ä§â§Ú§Ó§Ñ§ä§î §Ó §Ò§â§Ñ§å§Ù§Ö§â§Ñ§ç GML

   ??     §ß§Ö §Ú§Þ§Ö§Ö§ä §à§Ô§â§Ñ§ß§Ú§é§Ö§ß§Ú§Û §ß§Ñ §Ú§ã§á§à§Ý§î§Ù§à§Ó§Ñ§ß§Ú§Ö
        §Þ§à§Ø§ß§à §Ú§ã§á§à§Ý§î§Ù§à§Ó§Ñ§ä§î §Ò§Ö§Ù §á§â§Ú§Ó§ñ§Ù§Ü§Ú §Ü API




                                                        28
YMapsML

   §±§â§Ú§Þ§Ö§â
   <ymaps xmlns=quot;http://maps.yandex.ru/ymaps/1.xquot; xmlns:gml=quot;http://
       www.opengis.net/gmlquot; xmlns:xsi=quot;http://www.w3.org/2001/XMLSchema-
       instancequot; xsi:schemaLocation=quot;http://maps.yandex.ru/schemas/ymaps/1.x/
       ymaps.xsdquot;>
      <GeoObjectCollection>
         <gml:name>§°§Ò§ì§Ö§Ü§ä§í §Ü§Ñ§â§ä§Ö</gml:name>
         <gml:featureMembers>
           <GeoObject>
             <gml:name>§ª§Þ§ñ</gml:name>
             <gml:description>§°§á§Ú§ã§Ñ§ß§Ú§Ö</gml:description>
             <gml:Point>
                 <gml:pos>37.63 55.75</gml:pos>
             </gml:Point>
           </GeoObject>
         </gml:featureMembers>
      </GeoObjectCollection>
   </ymaps>


                                                                                29
YMapsML

   §¥§à§Ò§Ñ§Ó§Ý§Ö§ß§Ú§Ö §ß§Ñ §Ü§Ñ§â§ä§å §ã §á§à§Þ§à§ë§î§ð JavaScript API
    var data = new YMaps.YMapsML(
       quot;http://api.yandex.ru/maps/ymapsml/examples/xml/simpleobject.xmlquot;
    );
    map.addOverlay(data);




                                                                           30
§³§Ñ§Û§ä API §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä
http://api.yandex.ru/maps/

§¥§à§Ü§å§Þ§Ö§ß§ä§Ñ§è§Ú§ñ
http://api.yandex.ru/maps/doc/

§¬§Ý§å§Ò
http://api.yandex.ru/maps/club/




                                  31
§®§í §á§à§ã§ä§à§ñ§ß§ß§à §å§Ý§å§é§ê§Ñ§Ö§Þ §Ú §Õ§à§á§à§Ý§ß§ñ§Ö§Þ §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§Ú §ß§Ñ§ê§Ö§Ô§à API,
          §Ó §ä§à§Þ §é§Ú§ã§Ý§Ö §Ò§Ý§Ñ§Ô§à§Õ§Ñ§â§ñ §Ó§Ñ§ê§Ú§Þ §Ó§à§á§â§à§ã§Ñ§Þ.


                   §£§à§á§â§à§ã§í?



      §¤§à§Ý§å§Ò§Ö§Ó §¶§Ö§Õ§à§â, fgolubev@yandex-team.ru


                                                            32

More Related Content

Yandex Maps API

  • 1. API §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä §¤§à§Ý§å§Ò§Ö§Ó §¶§Ö§Õ§à§â §²§Ñ§Ù§â§Ñ§Ò§à§ä§é§Ú§Ü §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä, fgolubev@yandex-team.ru 1
  • 3. §®§à§Ø§ß§à §ã§Õ§Ö§Ý§Ñ§ä§î §Ò§Ö§ã§Ü§à§ß§Ö§é§ß§à§Ö §Ü§à§Ý§Ú§é§Ö§ã§ä§Ó§à §ã§Ö§â§Ó§Ú§ã§à§Ó, §ß§Ñ§á§â§Ú§Þ§Ö§â: ?? §ã§ç§Ö§Þ§Ñ §á§â§à§Ö§Ù§Õ§Ñ (http://gazmanov.ru/contacts/) ?? §Ü§Ñ§â§ä§Ñ §ß§Ö§ã§Ü§à§Ý§î§Ü§Ú§ç §à§æ§Ú§ã§à§Ó (http://company.yandex.ru/) ?? ?§Ô§Õ§Ö §Ó§í§á§Ú§ä§î??, §Ò§Ý§Ú§Ø§Ñ§Û§ê§Ú§Û §Ò§Ñ§â (http://tyndr.ru/places/) ?? §á§à§â§ä§Ñ§Ý §Ô§à§â§à§Õ§Ñ/§à§Ò§Ý§Ñ§ã§ä§Ú (http://www.66.ru/) ?? §Ò§Ñ§Ù§Ñ §ß§Ö§Õ§Ó§Ú§Ø§Ú§Þ§à§ã§ä§Ú (http://www.cian.ru/) ?? §ã§à§Ò§í§ä§Ú§ñ §ß§Ñ §Ü§Ñ§â§ä§Ö (http://news.yandex.ru) + §Ó§Ñ§ê §ã§Ö§â§Ó§Ú§ã
  • 4. API §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä ¡ª §ï§ä§à §ß§Ñ§Ò§à§â §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§à§Ó, §á§à§Ù§Ó§à§Ý§ñ§ð§ë§Ú§Û §Ó§ã§ä§â§Ñ§Ú§Ó§Ñ§ä§î §Ü§Ñ§â§ä§í §Á§ß§Õ§Ö§Ü§ã§Ñ §ß§Ñ §Ó§Ñ§ê §ã§Ñ§Û§ä.
  • 5. §ª§ß§ã§ä§â§å§Þ§Ö§ß§ä§í API: ?? JavaScript API ?? Static API ?? §¤§Ö§à§Ü§à§Õ§Ö§â ?? YMapsML 5
  • 6. §¥§Ý§ñ §â§Ñ§Ò§à§ä§í c API §ä§â§Ö§Ò§å§Ö§ä§ã§ñ §Ü§Ý§ð§é ?? §Ü§Ý§ð§é §á§â§Ú§Ó§ñ§Ù§Ñ§ß §Ü §Ú§Þ§Ö§ß§Ú §Õ§à§Þ§Ö§ß§Ñ ?? §Õ§Ý§ñ localhost §Ú 127.0.0.1 §á§à§Õ§à§Û§Õ§Ö§ä §Ý§ð§Ò§à§Û §Ü§Ý§ð§é ?? §â§Ñ§Ò§à§ä§Ñ§Ö§ä §Õ§Ý§ñ §á§à§Õ§Õ§à§Þ§Ö§ß§à§Ó §Ü§Ý§ð§é §Õ§Ý§ñ domen.ru §á§à§Õ§à§Û§Õ§Ö§ä §Ü www.domen.ru, blog.domen.ru ?? http://api.yandex.ru/maps/form.xml 6
  • 7. JavaScript API §Ò§Ú§Ò§Ý§Ú§à§ä§Ö§Ü§Ñ JavaScript §à§Ò§ì§Ö§Ü§ä§à§Ó §ä§Ö§Ü§å§ë§Ñ§ñ §Ó§Ö§â§ã§Ú§ñ 1.0.1 7
  • 8. JavaScript API §±§à§Õ§Ü§Ý§ð§é§Ö§ß§Ú§Ö ?? §à§Ò§í§é§ß§Ñ§ñ §Ù§Ñ§Ô§â§å§Ù§Ü§Ñ <head> <script src=http://api-maps.yandex.ru/{§Ó§Ö§â§ã§Ú§ñ}/key={Api-§Ü§Ý§ð§é}/> </head> ?? §à§ä§Ý§à§Ø§Ö§ß§ß§Ñ§ñ §Ù§Ñ§Ô§â§å§Ù§Ü§Ñ <head> <script src=http://api-maps.yandex.ru/{§Ó§Ö§â§ã§Ú§ñ}/key={Api-§Ü§Ý§ð§é }& loadByRequire=1 /> </head> ¡­ YMaps.load(callback); 8
  • 9. JavaScript API §³§à§Ù§Õ§Ñ§ß§Ú§Ö §Ü§Ñ§â§ä§í 1. §à§á§â§Ö§Õ§Ö§Ý§ñ§Ö§Þ §Ü§à§ß§ä§Ö§Û§ß§Ö§â §Ü§Ñ§â§ä§í <div id=quot;mapIDquot; style=quot;height:200px; width=200px; quot;> 2. §ã§à§Ù§Õ§Ñ§Ö§Þ §Ü§Ñ§â§ä§å var map = new YMaps.Map(document.getElementById(quot;mapIDquot;)); 3. §Ú§ß§Ú§è§Ú§Ñ§Ý§Ú§Ù§Ú§â§å§Ö§Þ (§è§Ö§ß§ä§â, §Þ§Ñ§ã§ê§ä§Ñ§Ò, §ä§Ú§á §Ü§Ñ§â§ä§í): map.setCenter( new YMaps.GeoPoint(37.63, 55.75), // §è§Ö§ß§ä§â 10, // §Þ§Ñ§ã§ê§ä§Ñ§Ò YMaps.MapType.MAP // §ä§Ú§á §Ü§Ñ§â§ä§í ); 9
  • 10. JavaScript API §£§ã§ä§â§à§Ö§ß§ß§í§Ö §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§Ú §Ü§Ñ§â§ä§í ?? §±§Ö§â§Ö§ä§Ñ§ã§Ü§Ú§Ó§Ñ§ß§Ú§Ö (Dragging) ?? §®§Ñ§ã§ê§ä§Ñ§Ò§Ú§â§à§Ó§Ñ§ß§Ú§Ö (ScrollZoom, DblClickZoom) ?? §£§í§Õ§Ö§Ý§Ö§ß§Ú§Ö §â§Ñ§Þ§Ü§à§Û (Magnifier) ?? §¤§à§â§ñ§é§Ú§Ö §Ü§Ý§Ñ§Ó§Ú§ê§Ú (HotKeys) ?? §­§Ú§ß§Ö§Û§Ü§Ñ (Ruler) map.enable{§£§à§Ù§Þ§à§Ø§ß§à§ã§ä§î}() -> map.enableRuler() map.disable{§£§à§Ù§Þ§à§Ø§ß§à§ã§ä§î} -> map.disableRuler() map.{§Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§î}Enabled() -> map.rulerEnabled() 10
  • 11. JavaScript API §¿§Ý§Ö§Þ§Ö§ß§ä§í §å§á§â§Ñ§Ó§Ý§Ö§ß§Ú§ñ (Controls) ?? §¿§Ý§Ö§Þ§Ö§ß§ä §Þ§Ñ§ã§ê§ä§Ñ§Ò§Ú§â§à§Ó§Ñ§ß§Ú§ñ (Zoom, SmallZoom) ?? §°§Ò§Ù§à§â§ß§Ñ§ñ §Ü§Ñ§â§ä§Ñ (MiniMap) ?? §±§Ö§â§Ö§Ü§Ý§ð§é§Ñ§ä§Ö§Ý§î §ä§Ú§á§à§Ó (TypeControl) + §Ó§Ñ§ê§Ú §ä§Ú§á§í §Ü§Ñ§â§ä ?? §®§Ñ§ã§ê§ä§Ñ§Ò§ß§Ñ§ñ §Ý§Ú§ß§Ú§ñ (ScaleLine) ?? §±§Ñ§ß§Ö§Ý§î §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§à§Ó (ToolBar) + §Ó§Ñ§ê§Ú §Ü§ß§à§á§Ü§Ú + §Ó§Ñ§ê§Ú §ï§Ý§Ö§Þ§Ö§ß§ä§í §å§á§â§Ñ§Ó§Ý§Ö§ß§Ú§ñ (IControl). map.addControl(IControl, controlPosition) map.removeControl(IControl) 11
  • 12. JavaScript API ToolBar TypeControl Zoom MiniMap ScaleLine 12
  • 13. JavaScript API §°§Ò§ì§Ö§Ü§ä§í §ß§Ñ §Ü§Ñ§â§ä§Ö (Overlay) ?? §®§Ö§ä§Ü§Ú (Placemark) ?? §±§à§Ý§Ú§Ý§Ú§ß§Ú§Ú (Polyline) + §Ó§Ñ§ê§Ú §à§Ò§ì§Ö§Ü§ä§í (IOverlay) ?? §¤§â§å§á§á§Ú§â§à§Ó§Ü§Ñ §à§Ò§ì§Ö§Ü§ä§à§Ó (OverayGroup, GeoObjectCollection) ?? §µ§á§â§Ñ§Ó§Ý§Ö§ß§Ú§Ö §Ó§Ú§Õ§Ú§Þ§à§ã§ä§î§ð §à§Ò§ì§Ö§Ü§ä§à§Ó (ObjectManager) map.addOverlay(overlay) map.removeOverlay(overlay) 13
  • 14. JavaScript API §¯§Ñ§ã§ä§â§à§Û§Ü§Ñ §Ó§ß§Ö§ê§ß§Ö§Ô§à §Ó§Ú§Õ§Ñ §à§Ò§ì§Ö§Ü§ä§à§Ó ?? §º§Ñ§Ò§Ý§à§ß§í (Template) ?? §³§ä§Ú§Ý§Ú (Style) 14
  • 15. JavaScript API §º§Ñ§Ò§Ý§à§ß§í (Template) ?? html §â§Ñ§Ù§Þ§Ö§ä§Ü§Ñ §ã§à §Ó§ã§ä§Ñ§Ó§Ü§Ñ§Þ§Ú §Õ§Ñ§ß§ß§í§ç var htmlText = quot;<h2><img src=/karmatsky/yandex-maps-api-1019729/quot;$[style.iconStyle.href] quot;/>$[name]</h2> <p>$[description|§Ò§Ö§Ù §Ü§à§Þ§Þ§Ö§ß§ä§Ñ§â§Ú§Ö§Ó]</p>quot; ?? §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§î §Õ§à§ã§ä§å§á§Ñ §á§à §Ü§Ý§ð§é§å YMaps.Templates.add(quot;my#templatequot;, new YMaps.Template(htmlText)); ¡­ var template = YMaps.Templates.get(quot;my#templatequot;); + §á§Ö§â§Ö§à§á§â§Ö§Õ§Ö§Ý§Ú§Ó §Þ§Ö§ä§à§Õ build §Þ§à§Ø§ß§à §â§Ö§Ñ§Ý§Ú§Ù§à§Ó§Ñ§ä§î §ã§Ó§à§ð §ê§Ñ§Ò§Ý§à§ß§Ú§Ù§Ñ§è§Ú§ð 15
  • 16. JavaScript API §³§ä§Ú§Ý§Ú (Style) ?? §ß§Ñ§Ò§à§â §á§â§Ö§Õ§à§á§â§Ö§Õ§Ö§Ý§Ö§ß§ß§í§ç §ã§ä§Ú§Ý§Ö§Û quot;default#whitePoint¡° ( ) , quot;default#greenPoint¡° ( ), ¡­ ?? §Þ§Ö§ç§Ñ§ß§Ú§Ù§Þ §ß§Ñ§ã§Ý§Ö§Õ§à§Ó§Ñ§ß§Ú§ñ §Ù§ß§Ñ§é§Ö§ß§Ú§ñ §Ü§à§ä§à§â§í§ç §ß§Ö§ä §Ó §Õ§à§é§Ö§â§ß§Ö§Þ §ã§ä§Ú§Ý§Ö, §Ú§ë§å§ä§ã§ñ §Ó §â§à§Õ§Ú§ä§Ö§Ý§î§ã§Ü§à§Þ ?? §á§â§Ú§Ó§ñ§Ù§Ü§Ñ §ê§Ñ§Ò§Ý§à§ß§à§Ó style.balloonContentStyle.setTemplate(quot;my#templatequot;); ?? §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§î §Õ§à§ã§ä§å§á§Ñ §á§à §Ü§Ý§ð§é§å 16
  • 17. JavaScript API §±§â§Ú§Þ§Ö§â 17
  • 18. Static API §Ó§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä §Ú§Ù§à§Ò§â§Ñ§Ø§Ö§ß§Ú§Ö §ã §Ü§Ñ§â§ä§à§Û §Ó §à§ä§Ó§Ö§ä §ß§Ñ HTTP-§Ù§Ñ§á§â§à§ã, §á§Ö§â§Ö§Õ§Ñ§Ó§Ñ§Ö§Þ§í§Û §á§à§ã§â§Ö§Õ§ã§ä§Ó§à§Þ URL §ã §á§Ñ§â§Ñ§Þ§Ö§ä§â§Ñ§Þ§Ú 18
  • 19. Static API §°§ã§à§Ò§Ö§ß§ß§à§ã§ä§Ú ?? §Þ§Ö§ß§î§ê§Ú§Û §à§Ò§ì§Ö§Þ §Ù§Ñ§Ô§â§å§Ø§Ñ§Ö§Þ§í§ç §Õ§Ñ§ß§ß§í§ç ?? §à§ä§ã§å§ä§ã§ä§Ó§Ú§Ö JavaScript ?? §Þ§Ñ§Ü§ã§Ú§Þ§Ñ§Ý§î§ß§Ñ§ñ §á§â§à§ã§ä§à§ä§Ñ §ª§Õ§Ö§Ñ§Ý§î§ß§à §Õ§Ý§ñ ?? §Ó§Ö§â§ã§Ú§Û §Õ§Ý§ñ §á§Ö§é§Ñ§ä§Ú ?? §á§â§à§ã§ä§í§ç §ã§ç§Ö§Þ §á§â§à§Ö§Ù§Õ§Ñ ?? §Ü§Ñ§â§ä§Ú§ß§à§Ü §Ó §Ò§Ý§à§Ô ?? §Ü§Ñ§â§ä §ß§Ñ §å§ã§ä§â§à§Û§ã§ä§Ó§Ñ§ç §ã §à§Ô§â§Ñ§ß§Ú§é§Ö§ß§ß§à§Û §á§à§Õ§Õ§Ö§â§Ø§Ü§à§Û JavaScript 19
  • 20. Static API §±§Ñ§â§Ñ§Þ§Ö§ä§â§í ?? §â§Ñ§Ù§Þ§Ö§â §Ü§Ñ§â§ä§í (size) §Þ§Ñ§Ü§ã§Ú§Þ§å§Þ 600 §ß§Ñ 450 §á§Ú§Ü§ã§Ö§Ý§Ö§Û ?? §à§Ò§Ý§Ñ§ã§ä§î §Ü§Ñ§â§ä§í ?? §è§Ö§ß§ä§â (ll, spn) ?? §Þ§Ñ§ã§ê§ä§Ñ§Ò (z) ?? §ä§Ú§á §Ü§Ñ§â§ä§í (l) ?? §à§Ò§ì§Ö§Ü§ä§í §ß§Ñ §Ü§Ñ§â§ä§Ö ?? §Þ§Ö§ä§Ü§Ú (pm) ?? §á§à§Ý§Ú§Ý§Ú§ß§Ú§Ú (pl) 20
  • 21. Static API §±§â§Ú§Þ§Ö§â http://static-maps.yandex.ru/1.x/? key={Api-§Ü§Ý§ð§é}& size=600,300& // §â§Ñ§Ù§Þ§Ö§â §Ü§Ñ§â§ä§í l=map& // §ä§Ú§á §Ü§Ñ§â§ä§í pl=37.65,55.74,37.66,55.75& // §á§à§Ý§Ú§Ý§Ú§ß§Ú§ñ pt=37.65,55.74 ~37.66,55.75,pmblm1 // §Þ§Ö§ä§Ü§Ú 21
  • 22. §¤§Ö§à§Ü§à§Õ§Ö§â §á§à§Ù§Ó§à§Ý§ñ§Ö§ä §à§á§â§Ö§Õ§Ö§Ý§ñ§ä§î §Ü§à§à§â§Õ§Ú§ß§Ñ§ä§í §Ú §á§à§Ý§å§é§Ñ§ä§î §ã§Ó§Ö§Õ§Ö§ß§Ú§ñ §à §Ô§Ö§à§Ô§â§Ñ§æ§Ú§é§Ö§ã§Ü§à§Þ §à§Ò§ì§Ö§Ü§ä§Ö §á§à §Ö§Ô§à §ß§Ñ§Ù§Ó§Ñ§ß§Ú§ð §Ú§Ý§Ú §Ñ§Õ§â§Ö§ã§å 22
  • 23. §¤§Ö§à§Ü§à§Õ§Ö§â §°§ã§à§Ò§Ö§ß§ß§à§ã§ä§Ú ?? §Ú§ã§á§â§Ñ§Ó§Ý§Ö§ß§Ú§Ö §à§á§Ö§é§Ñ§ä§à§Ü ?? §à§ä§Õ§Ñ§Ö§ä §Ó§ã§Ö §ß§Ñ§Û§Õ§Ö§ß§ß§à§Ö ?? §à§ä§Ó§Ö§ä§í §Ó §á§à§â§ñ§Õ§Ü§Ö §â§Ö§Ý§Ö§Ó§Ñ§ß§ä§ß§à§ã§ä§Ú §¯§Ñ§ã§ä§â§à§Û§Ü§Ú ?? §Ù§Ñ§Õ§Ñ§ß§Ú§Ö §à§Ò§Ý§Ñ§ã§ä§Ú §á§à§Ú§ã§Ü§Ñ (ll, spn) ?? §à§Ô§â§Ñ§ß§Ú§é§Ö§ß§Ú§Ö §Ü§à§Ý§Ú§é§Ö§ã§ä§Ó§Ñ §â§Ö§Ù§å§Ý§î§ä§Ñ§ä§à§Ó (result) ?? §á§à§ã§ä§â§Ñ§ß§Ú§é§ß§í§Û §Ó§í§Ó§à§Õ (result, skip) 23
  • 24. §¤§Ö§à§Ü§à§Õ§Ö§â §Ú§Ù§à§Ò§â§Ñ§Ø§Ö§ß§Ú§Ö §á§à§Ú§ã§Ü§à§Ó§à§Û §Ó§í§Õ§Ñ§é§Ú §Ò§Ö§ä§í 24
  • 25. §¤§Ö§à§Ü§à§Õ§Ö§â §ª§ß§ä§Ö§â§æ§Ö§Û§ã§í ?? JavaScript API (YMaps.Geocoder) §Ó§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä §ß§Ñ§Ò§à§â §Þ§Ö§ä§à§Ü var geocoder = new YMaps.Geocoder(quot;§®§à§ã§Ü§Ó§Ñquot;, options); map.addOverlay(geocoder); ?? http §á§â§à§ä§à§Ü§à§Ý (http://geocode-maps.yandex.ru/) §Ó§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä YMapsML §Õ§à§Ü§å§Þ§Ö§ß§ä http://geocode-maps.yandex.ru/1.x/?geocode=§®§à§ã§Ü§Ó§Ñ&key=API-§Ü§Ý§ð§é 25
  • 26. §¤§Ö§à§Ü§à§Õ§Ö§â §¶§â§Ñ§Ô§Þ§Ö§ß§ä §à§ä§Ó§Ö§ä§Ñ §Ô§Ö§à§Ü§à§Õ§Ö§â§Ñ <featureMember><GeoObject> <metaDataProperty><GeocoderMetaData> <kind>locality</kind> <text>§²§à§ã§ã§Ú§ñ, §®§à§ã§Ü§Ó§Ñ</text> <precision>other</precision> <AddressDetails xmlns=quot;urn:oasis:names:tc:ciq:xsdschema:xAL:2.0quot;> <Country> <CountryName>§²§à§ã§ã§Ú§ñ</CountryName> <Locality> <LocalityName>§®§à§ã§Ü§Ó§Ñ</LocalityName> </Locality> </Country> </AddressDetails> </GeocoderMetaData></metaDataProperty> <boundedBy><Envelope> <lowerCorner>37.177964 55.436075</lowerCorner> <upperCorner>38.040472 56.068469</upperCorner> </Envelope></boundedBy> <Point><pos>37.609218 55.753559</pos></Point> </GeoObject></featureMember> 26
  • 27. YMapsML (YMaps Markup Language) ¨C XML §ñ§Ù§í§Ü §à§á§Ú§ã§Ñ§ß§Ú§ñ §Ô§Ö§à§á§â§à§ã§ä§â§Ñ§ß§ã§ä§Ó§Ö§ß§ß§í§ç §Õ§Ñ§ß§ß§í§ç §Õ§Ý§ñ §à§ä§à§Ò§â§Ñ§Ø§Ö§ß§Ú§ñ §ã§â§Ö§Õ§ã§ä§Ó§Ñ§Þ§Ú §Á§ß§Õ§Ö§Ü§ã.§¬§Ñ§â§ä 27
  • 28. YMapsML YMapsML ?? xml-§æ§à§â§Þ§Ñ§ä §â§Ñ§Ò§à§ä§í §ã §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§Ñ§Þ§Ú API ?? §Õ§Ñ§ß§ß§í§Ö + §à§á§Ú§ã§Ñ§ß§Ú§Ö §à§ä§à§Ò§â§Ñ§Ø§Ö§ß§Ú§ñ ?? §Ò§Ñ§Ù§Ú§â§å§Ö§ä§ã§ñ §ß§Ñ §ã§ä§Ñ§ß§Õ§Ñ§â§ä§Ö GML (Geography ML) §Õ§à§Ü§å§Þ§Ö§ß§ä§í §Þ§à§Ø§ß§à §á§â§à§ã§Þ§Ñ§ä§â§Ú§Ó§Ñ§ä§î §Ó §Ò§â§Ñ§å§Ù§Ö§â§Ñ§ç GML ?? §ß§Ö §Ú§Þ§Ö§Ö§ä §à§Ô§â§Ñ§ß§Ú§é§Ö§ß§Ú§Û §ß§Ñ §Ú§ã§á§à§Ý§î§Ù§à§Ó§Ñ§ß§Ú§Ö §Þ§à§Ø§ß§à §Ú§ã§á§à§Ý§î§Ù§à§Ó§Ñ§ä§î §Ò§Ö§Ù §á§â§Ú§Ó§ñ§Ù§Ü§Ú §Ü API 28
  • 29. YMapsML §±§â§Ú§Þ§Ö§â <ymaps xmlns=quot;http://maps.yandex.ru/ymaps/1.xquot; xmlns:gml=quot;http:// www.opengis.net/gmlquot; xmlns:xsi=quot;http://www.w3.org/2001/XMLSchema- instancequot; xsi:schemaLocation=quot;http://maps.yandex.ru/schemas/ymaps/1.x/ ymaps.xsdquot;> <GeoObjectCollection> <gml:name>§°§Ò§ì§Ö§Ü§ä§í §Ü§Ñ§â§ä§Ö</gml:name> <gml:featureMembers> <GeoObject> <gml:name>§ª§Þ§ñ</gml:name> <gml:description>§°§á§Ú§ã§Ñ§ß§Ú§Ö</gml:description> <gml:Point> <gml:pos>37.63 55.75</gml:pos> </gml:Point> </GeoObject> </gml:featureMembers> </GeoObjectCollection> </ymaps> 29
  • 30. YMapsML §¥§à§Ò§Ñ§Ó§Ý§Ö§ß§Ú§Ö §ß§Ñ §Ü§Ñ§â§ä§å §ã §á§à§Þ§à§ë§î§ð JavaScript API var data = new YMaps.YMapsML( quot;http://api.yandex.ru/maps/ymapsml/examples/xml/simpleobject.xmlquot; ); map.addOverlay(data); 30
  • 32. §®§í §á§à§ã§ä§à§ñ§ß§ß§à §å§Ý§å§é§ê§Ñ§Ö§Þ §Ú §Õ§à§á§à§Ý§ß§ñ§Ö§Þ §Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§Ú §ß§Ñ§ê§Ö§Ô§à API, §Ó §ä§à§Þ §é§Ú§ã§Ý§Ö §Ò§Ý§Ñ§Ô§à§Õ§Ñ§â§ñ §Ó§Ñ§ê§Ú§Þ §Ó§à§á§â§à§ã§Ñ§Þ. §£§à§á§â§à§ã§í? §¤§à§Ý§å§Ò§Ö§Ó §¶§Ö§Õ§à§â, fgolubev@yandex-team.ru 32