I am unable to get a drop pin button working on my bing map. I'm able to get a regular push pin on the map (it is auto created in the center) but I'd like to be able to move around and push a button to drop it in the center.
Thanks for any help.
function dropPin() {
dropPushPin = new Microsoft.Maps.Pushpin(map.getCenter(), {
color: '#f00',
position: map.getCenter(),
map: map,
draggable: true
});
map.entities.push(dropPushPin);
}
<button onclick="dropPin()">Try it</button>