简体   繁体   中英

Will Bing maps right-size the map to an array of coordinates?

What I want to be able to do is pass an array of coordinates to a Bing map, and then have it show all of the waypoints/"pushpins" but only as much "area" as necessary. IOW, if I pass in coordinates that are all contained within eastern Calaveras County, the map should show only that area with very little margins around the outer waypoints. If, OTOH, I pass in an array of waypoints, and one is in Switzerland while others are in Swaziland, the map should be that "zoomed out" - showing from Swaziland to Switzerland, with the waypoints, no more and no less.

Also or thus, I would want the map to be centered: If the array of waypoints were in San Francisco and Lake Tahoe, Elk Grove (or very near it) should be at the center of the map.

In the older APIs there was an option to create a bounding rectangle from a set of points but this was not added to the windows store version of the control. Bounding rectangles still exist, and may be used to set the map extents, but you have to determine the limits manually.

This may change in future updates, but to me the APIs feel a little too light for many scenarios, including the one you ask about.

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