简体   繁体   中英

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). But i need to show only 5 pushpins which is there in the list on left side.

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.

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/en-us/library/gg508988.aspx

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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