简体   繁体   English

在必应地图中,默认情况下需要显示至少5个图钉

[英]In bing maps need to show minimum 5 pushpins by default

I am using Bing Maps. 我正在使用必应地图。 I have 25 latitude and longitude values, i am showing list of only 5 values(Lat and Long)with previous and next buttons on left side and maps on right side(showing pushpins on hard-coded zoom level). 我有25个经度和纬度值,我仅在左侧显示上一个和下一个按钮,在右侧显示地图(仅在硬编码缩放级别上显示图钉),仅显示5个值(纬度和经度)的列表。 But i need to show only 5 pushpins which is there in the list on left side. 但是我只需要显示5个图钉,就在左侧列表中。

If i click on next button i can able to load next 5 lat and long values(on left side), but i need to change the map(on right side) to show only pushpins from 6 to 10. 如果我单击下一步按钮,则可以加载下5个经度和纬度值(在左侧),但是我需要更改地图(在右侧)以仅显示图钉从6到10。

If i zoom out, i should be able to see all Pushpins. 如果缩小,我应该能够看到所有图钉。 Is this possible in bing maps? 必应地图有可能吗?

And also how can i show tooltip on mouse over of pushpins. 还有如何在图钉上的鼠标上显示工具提示。

Yes. 是。 This can be easily done. 这很容易做到。 It's just a mater of storing all the locations in an array and keeping track of the index of the pages. 将所有位置存储在一个数组中并跟踪页面索引只是一件很重要的事情。 If the page changes grab the data for that range, clear the map and add the new locations to the map, maybe center over as well for a nicer experience. 如果页面更改获取了该范围内的数据,请清除地图并将新位置添加到地图,或者也可以居中放置以获得更好的体验。 You can add some logic that uses the view change end event to know when the zoom levels change and show all locations when the zoom level is such that it is zoomed out enough. 您可以添加一些逻辑,这些逻辑使用视图更改结束事件来知道缩放级别何时更改,并在缩放级别足够大时显示所有位置。 Here is some documentation on some of the things you will need: http://msdn.microsoft.com/en-us/library/gg427604.aspx 这是一些您需要的一些文档: http : //msdn.microsoft.com/zh-cn/library/gg427604.aspx

http://msdn.microsoft.com/en-us/library/gg508988.aspx http://msdn.microsoft.com/en-us/library/gg508988.aspx

http://msdn.microsoft.com/en-us/library/gg427611.aspx http://msdn.microsoft.com/en-us/library/gg427611.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM