angularjs – Angular-google-map界限示例

前端之家收集整理的这篇文章主要介绍了angularjs – Angular-google-map界限示例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
没弄明白怎么做.
我有一堆标记,我手动计算东北和西南点.但它看起来没有效果; (期待一个如何使用边界的例子.谢谢.

HTML

  1. <google-map center="map.center" zoom="map.zoom" pan="true" draggable="true" bounds="maps.bounds">

JS:

  1. $scope.map = {
  2. // http://angular-google-maps.org/use
  3. center: {
  4. latitude: 34.04858,longitude: -84.29431
  5. },zoom: 16,lineStyle: {
  6. color: '#333',weight: 5,opacity: 0.7
  7. },bounds:{}
  8.  
  9. };
  10. // in another call...............
  11. $scope.map.bounds={
  12. northeast : northeast,southwest: southwest
  13. }
  14. $scope.$apply();
我认为问题可能是变焦. 从逻辑上讲,缩放概念不会与边界相关,因为边界定义了缩放.

猜你在找的Angularjs相关文章