Skip to content

add the 'fitBounds()' functionality#12

Closed
sandrotosi wants to merge 1 commit intogmplot:masterfrom
sandrotosi:fitBounds
Closed

add the 'fitBounds()' functionality#12
sandrotosi wants to merge 1 commit intogmplot:masterfrom
sandrotosi:fitBounds

Conversation

@sandrotosi
Copy link
Copy Markdown
Contributor

This function takes 2 sets of arguments, the North-East Lat/Lng and the
South-West Lat/Lng, which are used to compute a LatLngBounds() which is then
passed to the gmap fitBounds() method.

The result is a map with the correct zoom to show the NE-SW region.

As a possible improvement, we could automatically store the NE/SW corners for
every new object added to the map (via gmplot methods) and then just
'requesting' to fit those bounds by flipping a True/False flag.

This function takes 2 sets of arguments, the North-East Lat/Lng and the
South-West Lat/Lng, which are used to compute a LatLngBounds() which is then
passed to the gmap fitBounds() method.

The result is a map with the correct zoom to show the NE-SW region.

As a possible improvement, we could automatically store the NE/SW corners for
every new object added to the map (via gmplot methods) and then just
'requesting' to fit those bounds by flipping a True/False flag.
This was referenced Apr 29, 2016
@sandrotosi
Copy link
Copy Markdown
Contributor Author

@vgm64 ping

@vgm64 vgm64 force-pushed the master branch 7 times, most recently from 823e3ad to ad6df42 Compare March 4, 2018 07:22
@sandrotosi
Copy link
Copy Markdown
Contributor Author

updated at #125

@sandrotosi sandrotosi closed this Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant