Saturday, 30 May 2015

ng-map set maximum and minimum zoom level.


Angularjs-Google-Maps

You can't do this:

<map zoom="2" minZoom="1" maxZoom="2" ce

You can't do this:

<map zoom="2" map-type-control-options="{
  mapTypeIds: ['moon'],
   minZoom: 1,
    maxZoom: 1
}">

The only solution is:

$scope.$on('mapInitialized', function(evt, evtMap) {
            map = evtMap;
            map.setOptions({maxZoom:3, minZoom: 2});//set maxzoom and minzoom




No comments:

Post a comment