Skip to content
This repository was archived by the owner on May 11, 2020. It is now read-only.

Conversation

xavierjohn
Copy link
Contributor

When markers are added, the zoom is automatically adjusted.

@allenhwkim
Copy link
Owner

tried the same thing with no success in directives/map.js. Don't know why

    if (attrs.zoomToIncludeMarkers == 'auto') {
      scope.$watch(function() {
        return scope.map.markers;
      }, function(n, o) {
        console.log('bbbbbbbbbbbbbbbbbb', scope.map, ctrl.map);
        ctrl.zoomToIncludeMarkers();
      });
    } 

allenhwkim added a commit that referenced this pull request Jul 28, 2015
@allenhwkim
Copy link
Owner

Added this feature by emitting an event and consuming it. The example is here

@allenhwkim allenhwkim closed this Jul 28, 2015
@xavierjohn
Copy link
Contributor Author

Cool, thanks.

@xavierjohn
Copy link
Contributor Author

You may want to update your documentations about zoom-to-include-markers='true' and zoom-to-include-markers='auto'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants