javascriptbing-mapspins

Draggable AND clickable pushpin in javascript bing map


Does anyone get the way to put draggable pushpins through the bing api using javascript? Its is even possible to have that functionality through the api (javascript)?


Solution

  • The answer is there! http://www.bingmapsportal.com/ISDK/AjaxV7#Pushpins13

    var pushpinOptions = {icon: 'poi_custom.png', draggable:true}; 
    var pushpin= new Microsoft.Maps.Pushpin(map.getCenter(), pushpinOptions); 
    pushpindragend= Microsoft.Maps.Events.addHandler(pushpin, 'dragend', enddragDetails);  
    map.entities.push(pushpin);