Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GoogleMaps V3 CheckResize() function

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

like image 464
RIK Avatar asked Jun 20 '11 14:06

RIK


People also ask

How do I get data from Google Maps API?

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.

How can I get a free Google Map API key?

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.

Where am I right now exact address Google Maps?

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.


1 Answers

 google.maps.event.trigger(map, 'resize');
like image 63
bokor Avatar answered Oct 11 '22 12:10

bokor