- Uncaught TypeError: Object [object Object] has no method 'addEventListener' combine.xml:250
- domEvents.onStartListeningcombine.xml:250
- EventManager.callControllerscombine.xml:9777
- EventManager.addcombine.xml:9613
- domEvents.addcombine.xml:173
- ElementEventsProxy.addcombine.xml:301
- EventGroup.addcombine.xml:9937
- imageLoader._loadImagecombine.xml:34392
- imageLoader._continueLoadingcombine.xml:34379
- AStrategyBase.executecombine.xml:54316
- executeDelayedFunctionscombine.xml:50243
- eventDispatchercombine.xml:57741
- EventManager.firecombine.xml:9747
- globalDomHandlerОбъект не проверяется на addEventListener? О_оКод:var address = "Какой-то там адрес.";var id = "ymaps-container";
ymaps.ready( function(){
console.info("Yandex.Map object");
console.dir(ymaps); //all right
ymaps.geocode(address, {
results: 1
}).then(function (res) {
var geoPoint = res.geoObjects.get(0).geometry.getCoordinates();
var myPlacemark = new ymaps.Placemark(geoPoint);
window.myMap = new ymaps.Map(id, {
center: geoPoint,
zoom: 15,
behaviors: ["default", "scrollZoom"],
type: "yandex#map"
});
window.myMap.controls.add
("zoomControl").add("type Selector"); window.myMap.geoObjects.add(myPlacemark);
});
});