百度地图中根据页面中的point,自动设置缩放级别和视图中心,将所有的point在视图范围内展示。
var points = [point1, point2,point3]; var view = map.getViewport(eval(points)); var mapZoom = view.zoom; var centerPoint = view.center; map.centerAndZoom(centerPoint,mapZoom);
时间: 2024-10-23 16:38:42