I have a google map that takes the users post code and loads in directions. The map then shrinks by around 300px in width. Although the map and options adjust to this new width, the route however remains as if the map did not shrink with not all of it in view.
I believe the way to checkResize() but I do not know how to use this. Essentially I would need to trigger it on an onClick event. How is this done. Maps API v3
Any ideas?
Marvellous
Go to APIs & Services → Dashboard → Enable APIs & Services at the top and Choose Maps Javascript API from the API Library. This will open up the Map JavaScript API page, and Enable it.
Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.
Right-click the blue dot on the map and a context menu will expand. Click “What's here?” on the menu to see your current location's address and latitude/longitude coordinates.
google.maps.event.trigger(map, 'resize');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With