communityconnect icon indicating copy to clipboard operation
communityconnect copied to clipboard

Calculate (vs hardcode) defaultZoom & defaultCenter

Open galiat opened this issue 8 years ago • 3 comments

(Note: not critical)

Inspired by https://github.com/codeforboston/communityconnect/pull/81

it would be best if the map's defaultZoom & defaultCenter were computed based on the data we want to display rather than hard coded

galiat avatar Oct 24 '18 15:10 galiat

I wanted to try this one, but I wasn't sure how to go about doing it. What data would we use to calculate them?

tshin7 avatar Dec 13 '18 20:12 tshin7

I think this issue will be necessary since the markers on the map changes based on the saved resources. If anyone would like to try, I would look up how to make the map zoom to fit all markers that show up on the map. This could be a start:

https://stackoverflow.com/questions/47239508/how-to-use-fitbounds-in-react-google-map-once-you-have-bounds

Khoawala avatar Jan 25 '19 03:01 Khoawala

Hey guys, I'm also working on this one, I came across this link that might be the solution. I spent my weekly hack night to find this and understand our app's code. I'll try my best to finish it by next weekend.

link: https://github.com/tomchentw/react-google-maps/issues/305

rahulmotan avatar Feb 20 '19 02:02 rahulmotan