Yandex Maps API


         Andrey
Karmatsky
            karma@yandex‐team.ru
Яндекс
.Карты
    Yandex
Maps:
         –   180
ci8es
of
Russia,
Ukraine
and
other
CIS
countries
         –   World
map
in
Russian
         –   Detailed
satellite
images
for
300
ci8es
Яндекс
.Карты




         Map   Hybrid   Satellite
API
Yandex
Maps
is
free
Our toolbox for developers


      Яндекс               API
Я.Карт


          JavaScript
API

               Sta$c
API

               Geocoder

                Router

               YMapsML
JavaScript API
Interactive map on your page
JavaScript API

  Quick
start
 Add API script
       <script src=“http://api-maps.yandex.ru/{version}/key={API-
       key}”/>


 Add placeholder for the map
       <div id=“mapID” style=“width:200px; height:200px;”>


 Initialize the map
       var map = new YMaps.Map(YMaps.jQuery(“#mapID”));
       map.setCenter(
            new YMaps.GeoPoint(39.68,47.25),    // set center
            10,                                 // set zoom
            YMaps.MapType.MAP                   // map type
       );



  Example: http://api.yandex.ru/maps/jsapi/examples/mapbasics.html
JavaScript API

    User
interac8on
     –   Built-in functions
     (dragging map, zooming by double-click, zooming by mouse wheel, right-click area selection,
         hot keys, ruler)

     –   Standard control elements
     (search bar, toolbar, map type selector, zoom control, preview map window)

     –   YMaps.IControl – to create your custom controls

    Example: http://api.yandex.ru/maps/jsapi/examples/mapcontrolsadding.html
JavaScript API

    Objects
on
the
map
       Placemarks
       http://api.yandex.ru/maps/jsapi/examples/coordinatesmarkers.html

       Polylines
       http://api.yandex.ru/maps/jsapi/examples/mappolylinesediting.html

       Polygons
       http://api.yandex.ru/maps/jsapi/examples/mapstylepolygon.html


       You can customize object styles: placemark icon and shadow image, color and
       thickness of lines and polygon border, polygon fill color

       YMaps.IOverlay – to create your custom objects
•   Здесь
нужна
картинка
кальки

     Static API
     Embedded map image on your page
Stati
c
API
        Map
parameters
         Size

         Zoom

         View area

         Map objects: placemarks, polylines, polygons



         Example: http://static-maps.yandex.ru/1.x/?l=map&pl=c:8822DDC0,w:
            5,37.656577,55.741176,37.656748,55.741419,37.655131,55.741814,37.658257,55.74252
            4,37.659811,55.743066,37.659667,55.743233,37.659551,55.743603,37.659775,55.74392
            8,37.662398,55.745281&pt=37.656577,55.741176,pmrdm1~37.662398,55.745281,pmblm
            2~37.667788,55.732017,pmwtl3&key=ABYQNEkBAAAAgM-
            ZTwMAK_IKAfJkc-72mWoAq8el6lFmTeEAAAAAAAAAAAChHQgTyECkUqGduyet_fMaeQ
            6ckw==



         More StaticAPI examples: http://api.yandex.ru/maps/staticapi/examples/
Geocoder
convert an address into
geographic coordinates
Geocoder



      –    reverse-geocoding
           –   coordinates into address
      –    spell-checking
      –    viewport biasing
      –    language selection
      –    paging
Geocoder

    Geocoder interfaces
      JavaScript geocoder:
           –   YMaps.Geocoder object in JavaScript API
           –   Search bar control (YMaps.SearchControl)




      XML-based HTTP-service
      http://geocode-maps.yandex.ru/1.x/
Router
get
driving
direc8ons
Router




         YMaps.Router object in JS API
         –   returns
             –   route length and time
             –   detailed driving directions
             –   route geometry (polyline)
         –   now available in Moscow and Ukraine (in «beta»)
Thank you

Developers forum – http://clubs.ya.ru/mapsapi/
   Support – support@api-maps.yandex.ru
Documentation – http://api.yandex.ru/maps/doc/
    Website – http://api.yandex.ru/maps/


                 Andrey
Karmatsky
                     karma@yandex‐team.ru

Yandex Maps API

  • 1.
    Yandex Maps API Andrey
Karmatsky karma@yandex‐team.ru
  • 2.
    Яндекс .Карты Yandex
Maps: – 180
ci8es
of
Russia,
Ukraine
and
other
CIS
countries – World
map
in
Russian – Detailed
satellite
images
for
300
ci8es
  • 3.
    Яндекс .Карты Map Hybrid Satellite
  • 4.
  • 5.
    Our toolbox fordevelopers Яндекс API
Я.Карт JavaScript
API Sta$c
API Geocoder Router YMapsML
  • 6.
  • 7.
    JavaScript API Quick
start Add API script <script src=“http://api-maps.yandex.ru/{version}/key={API- key}”/> Add placeholder for the map <div id=“mapID” style=“width:200px; height:200px;”> Initialize the map var map = new YMaps.Map(YMaps.jQuery(“#mapID”)); map.setCenter( new YMaps.GeoPoint(39.68,47.25), // set center 10, // set zoom YMaps.MapType.MAP // map type ); Example: http://api.yandex.ru/maps/jsapi/examples/mapbasics.html
  • 8.
    JavaScript API User
interac8on – Built-in functions (dragging map, zooming by double-click, zooming by mouse wheel, right-click area selection, hot keys, ruler) – Standard control elements (search bar, toolbar, map type selector, zoom control, preview map window) – YMaps.IControl – to create your custom controls Example: http://api.yandex.ru/maps/jsapi/examples/mapcontrolsadding.html
  • 9.
    JavaScript API Objects
on
the
map Placemarks http://api.yandex.ru/maps/jsapi/examples/coordinatesmarkers.html Polylines http://api.yandex.ru/maps/jsapi/examples/mappolylinesediting.html Polygons http://api.yandex.ru/maps/jsapi/examples/mapstylepolygon.html You can customize object styles: placemark icon and shadow image, color and thickness of lines and polygon border, polygon fill color YMaps.IOverlay – to create your custom objects
  • 10.
    Здесь
нужна
картинка
кальки Static API Embedded map image on your page
  • 11.
    Stati c API Map
parameters Size Zoom View area Map objects: placemarks, polylines, polygons Example: http://static-maps.yandex.ru/1.x/?l=map&pl=c:8822DDC0,w: 5,37.656577,55.741176,37.656748,55.741419,37.655131,55.741814,37.658257,55.74252 4,37.659811,55.743066,37.659667,55.743233,37.659551,55.743603,37.659775,55.74392 8,37.662398,55.745281&pt=37.656577,55.741176,pmrdm1~37.662398,55.745281,pmblm 2~37.667788,55.732017,pmwtl3&key=ABYQNEkBAAAAgM- ZTwMAK_IKAfJkc-72mWoAq8el6lFmTeEAAAAAAAAAAAChHQgTyECkUqGduyet_fMaeQ 6ckw== More StaticAPI examples: http://api.yandex.ru/maps/staticapi/examples/
  • 12.
    Geocoder convert an addressinto geographic coordinates
  • 13.
    Geocoder – reverse-geocoding – coordinates into address – spell-checking – viewport biasing – language selection – paging
  • 14.
    Geocoder Geocoder interfaces JavaScript geocoder: – YMaps.Geocoder object in JavaScript API – Search bar control (YMaps.SearchControl) XML-based HTTP-service http://geocode-maps.yandex.ru/1.x/
  • 15.
  • 16.
    Router YMaps.Router object in JS API – returns – route length and time – detailed driving directions – route geometry (polyline) – now available in Moscow and Ukraine (in «beta»)
  • 17.
    Thank you Developers forum– http://clubs.ya.ru/mapsapi/ Support – support@api-maps.yandex.ru Documentation – http://api.yandex.ru/maps/doc/ Website – http://api.yandex.ru/maps/ Andrey
Karmatsky karma@yandex‐team.ru

Editor's Notes

  • #6 &amp;#x43F;&amp;#x43E;&amp;#x434;&amp;#x43A;&amp;#x43E;&amp;#x440;&amp;#x440;&amp;#x435;&amp;#x43A;&amp;#x442;&amp;#x438;&amp;#x440;&amp;#x43E;&amp;#x432;&amp;#x430;&amp;#x442;&amp;#x44C; &amp;#x43E;&amp;#x43F;&amp;#x440;&amp;#x435;&amp;#x434;&amp;#x435;&amp;#x43B;&amp;#x435;&amp;#x43D;&amp;#x438;&amp;#x435;
  • #15 &amp;#x437;&amp;#x430;&amp;#x43C;&amp;#x435;&amp;#x43D;&amp;#x438;&amp;#x442;&amp;#x44C; &amp;#x43A;&amp;#x430;&amp;#x440;&amp;#x442;&amp;#x438;&amp;#x43D;&amp;#x43A;&amp;#x443; &amp;#x43D;&amp;#x430; &amp;#x43F;&amp;#x43E;&amp;#x438;&amp;#x441;&amp;#x43A; &amp;#x447;&amp;#x435;&amp;#x433;&amp;#x43E;-&amp;#x442;&amp;#x43E;