Je suis en train de gérer l'événement onchangeview pour bing mapspoignée onchangeview événement pour les cartes Bing
Dans la méthode intialize js Je le code suivant:
map = new Microsoft.Maps.Map(document.getElementById("mapviewer"), {
credentials: bingMapsKey,
center : new Microsoft.Maps.Location(42.3508, -71.0717),
zoom: 12
});
//Microsoft.Maps.Events.addHandler(map, "onchangeview", handleChangeView);
Microsoft.Maps.Events.addHandler(map, "onclick", handleChangeView);
mapviewer.attachEvent("onchangeview", handleChangeView);
J'ai aussi cette fonction
{} handleChangeView (e) fonction
cette fonction n'est jamais appelée, et je ne sais pas pourquoi le gestionnaire est correctement configuré.
Je ne comprends pas la différence entre les 2 lignes et quand je joindre un événement d'une manière ou l'autre
Microsoft.Maps.Events.addHandler(map, "onclick", handleChangeView);
mapviewer.attachEvent("onchangeview", handleChangeView);
Toutes les idées suivantes?