I had to switch to the version of maps API 1.1 with 2.1, because in Excel in WebBrowser costs IE7. Question :
How to get geocoding coordinates at? this.get(0) something wrong; an example is taken from here :
var map, geoResult; YMaps.jQuery(function () { map = new YMaps.Map(YMaps.jQuery("#YMapsID")[0]); map.setCenter(new YMaps.GeoPoint(37.64, 55.76), 10); map.addControl(new YMaps.TypeControl()); var geocoder = new YMaps.Geocoder("Москва Арбат", {results: 1, boundedBy: map.getBounds()}); YMaps.Events.observe(geocoder, geocoder.Events.Load, function () { geoResult = this.get(0); map.addOverlay(geoResult); map.setBounds(geoResult.getBounds()); }); }); <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ТЕСТИМ!</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="https://api-maps.yandex.ru/1.1/index.xml" type="text/javascript"></script> <script type="text/javascript"> </script> </head> <body> <div id="YMapsID" style="width:600px;height:400px"></div> </body> </html> Coordinates are needed to add a new tag with the description I need:
// Создает метку в центре Москвы var placemark = new YMaps.Placemark(new YMaps.GeoPoint(КООРДИНАТЫ)); placemark.name = "Москва"; placemark.description = "Столица Российской Федерации"; map.addOverlay(placemark);