我现在被谷歌地图v3卡住了。我尝试用这种方式手动添加边界,但它不起作用!?
map.fitBounds((53.399999, 9.73215099999993), (53.717145, 10.123491999999942));
发布于 2011-12-08 03:27:23
fitBounds需要一个LatLngBounds类型的对象,而该对象是用两个LatLng对象初始化的。
这应该是可行的:
sw = new LatLng(53.399999, 9.73215099999993);
ne = new LatLng(53.717145, 10.123491999999942);
bounds = new LatLngBounds(sw, ne)
map.fitBounds(bounds);参考资料:
LatLngLatLngBoundsfitBounds()https://stackoverflow.com/questions/8421196
复制相似问题