JavaScript必应地图中的可拖动和可点击图钉 [英] Draggable AND clickable pushpin in javascript bing map

查看:100
本文介绍了JavaScript必应地图中的可拖动和可点击图钉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能使用javascript将可拖动的图钉通过bing API放置吗?甚至有可能通过api(javascript)具有该功能?

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)?

推荐答案

答案就在那里! 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);

这篇关于JavaScript必应地图中的可拖动和可点击图钉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆