0

I am using https://github.com/wimagguc/jquery-latitude-longitude-picker-gmaps in a bootstrap Modal window. But because it needs to be resized after modal window in loaded/shown the below trigger effect is not working as with this script there is no global variable 'map'

google.maps.event.trigger(map, 'resize');

Looking at the .js file of the above script, can anyone tell me on what I need to trigger the resize?

Alvin Bakker
  • 1,456
  • 21
  • 40
  • Your map variable appears not to be global and you should initiate it to be global variable. If you want further help, please attach the code which you want to fix. Thanks. – Dayton Wang Dec 10 '14 at 22:48
  • It seems this questions has been asked before. http://stackoverflow.com/questions/13059034/how-to-use-google-maps-event-triggermap-resize – so_jin_ee Dec 10 '14 at 23:19
  • Well in the js code they are using _self.vars.map as the variable. How do I make this a global one? – Alvin Bakker Dec 11 '14 at 11:31
  • When I set 'gmap' as global variable and after setting gmap = _self.vars.map, the resize action gives yet another error: Uncaught TypeError: Cannot read property '__e3_' of undefined So I am very lost now – Alvin Bakker Dec 11 '14 at 12:18

0 Answers0