没弄明白怎么做.
@H_301_1@我有一堆标记,我手动计算东北和西南点.但它看起来没有效果; (期待一个如何使用边界的例子.谢谢.
HTML:
<google-map center="map.center" zoom="map.zoom" pan="true" draggable="true" bounds="maps.bounds">
JS:
$scope.map = { // http://angular-google-maps.org/use center: { latitude: 34.04858,longitude: -84.29431 },zoom: 16,lineStyle: { color: '#333',weight: 5,opacity: 0.7 },bounds:{} }; // in another call............... $scope.map.bounds={ northeast : northeast,southwest: southwest } $scope.$apply();
我认为问题可能是变焦. 从逻辑上讲,缩放概念不会与边界相关,因为边界定义了缩放.
原文链接:https://www.f2er.com/angularjs/141822.html