简体   繁体   English

必应地图是否可以将地图的大小正确调整为坐标数组?

[英]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. 我想要做的是将坐标数组传递到Bing地图,然后让它显示所有航路点/“图钉”,但仅显示必要的“区域”。 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. IOW,如果我传递的所有坐标都包含在东部Calaveras县内,则地图应仅显示在外部航路点周围几乎没有空白的区域。 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. 如果是OTOH,我经过一系列航路点,一个在瑞士,而另一个在斯威士兰,则地图应该是“缩小”的地图-从斯威士兰到瑞士,并显示更多的航路点。

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. 在较早的API中,有一个选项可以根据一组点来创建边界矩形,但是未将其添加到控件的Windows存储版本中。 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. 这可能会在将来的更新中发生变化,但是对我来说,对于许多情况(包括您所要求的情况),API的感觉有点太轻了。

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

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