1

I have initialized the map on load and after clicking on a list item markers will be added to the map based on data from backend. After that by clicking a button the map should be displayed in another view.The map is displayed as a small square in the top left corner.

I know this problem is caused due to initializing the map onload. But I have few more map views so I dont want to initialize everytime.

Is there anyway to solve this?

I am using the resize method..But I want to know where exactly I need to use the function..If in div containing the map container, on which event should I attach resize?

hash87
  • 23
  • 5
  • have you tried to call googles resize:: google.maps.event.trigger(this.map, "resize"); – tik27 Sep 05 '13 at 17:19
  • May be some of the answers here may help: http://stackoverflow.com/questions/743214/how-do-i-resize-a-google-map-with-javascript-after-it-has-loaded – Orlando Rincón Dec 02 '13 at 15:37

1 Answers1

0

When you are doing the resize, you could fire a topic publish and on the subscribe for that topic, you could fire the resize trigger within Google Maps API?

knowncitizen
  • 1,523
  • 2
  • 17
  • 21