angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

How to zoom the marker points using fit bound property or any other

Open VaseemMalik opened this issue 9 years ago • 1 comments

** Need to make the map auto zoom / center based on the map points (markers)**

I'm doing research on the below requirement,

I need to make the map auto zoom / center based on the map points to be shown. based on the google api and this library it looks like i need to make a "bounds" object and call .extend for each marker i need to show and then set or bind the fitBound property. where i am stuck right now is how to populate the bounds object with the data. i am having issues with how to create the LatLng object . in the code i see an interface that has methods but no class that implements the interface and the latlng interface says the lat and lng are methods not properties. what am i missing in this picture ??

Could you please provide some sample solution or code snippet to zoom the markers area by using fitbounds?

angular2 & angular-google-maps version

VaseemMalik avatar Jan 24 '17 14:01 VaseemMalik

This is a duplicate of #781. I'm currently working on a PR #868. This will be available in the next version.

sebholstein avatar Jan 27 '17 07:01 sebholstein