必应地图可拖动图钉问题 [英] Bing Maps draggable pushpin issue

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

问题描述


我在整合Bing地图时遇到问题.
问题是,我在本文中编译了项目

使用纯Javascript的Microsoft VEMap [

Hi,
I have a problem with integrating Bing Maps.
The issue is,I compiled the project in this article

Microsoft VEMap Using Pure Javascript[^]

Because it is the project that I want exactly,I can put pushpin but can''t drag it to near place. I looked from bingmapsportal SDK but it didn''t work.
Thank you very much.

推荐答案

如果您对从CodeProject文章获得的代码有疑问,请在文章末尾使用论坛与作者进行交流.
If you have issues with code that you obtained from CodeProject articles then use the forum at the end of the article to communicate with the author.



我没看代码,但可能是您没有使用图钉的可拖动属性,例如

_vpushPin.Draggable = true;

如需更多帮助,请询问我.
Hi,
I didn''t look code but may be you are not using draggable property of pushpin like

_vpushPin.Draggable = true;

For more help, please ask me.


对不起,我没有Visual Studio,但是我看到的是GeoCode.htm页面,其中包含您所告诉的所有内容.如果我是对的然后在功能GeocodeCallback中,您必须添加一行

Sorry I didn''t have visual studio,but I look the page GeoCode.htm which have all the contents as you told.If I am right then in function GeocodeCallback you have to add one line

var bestPlace = places[0];

          // Add pushpin to the *best* place
          var location = bestPlace.LatLong;

          var newShape = new VEShape(VEShapeType.Pushpin, location);
          newShape.Draggable = true; //new line
          var desc = "Latitude: " + location.Latitude + "<br>Longitude:" + location.Longitude;


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

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