Closed adehner closed 1 year ago
Obviously it's a little late for any action on our end on this issue.
Just for completion, I think you were already working with the idea of using Google's "resize" event (today, this would be done with Leaflet's "invalidateSize" function as we now use Leaflet in this plugin), triggered from the "tab changed" events provided by the tab library. This is still how this is done, for example we do this in the code for the "form" map since it's presented in a tab.
The only issue for a shortcode map would be getting hold of the Leaflet object, but Geolocation helpfully just sets a variable on the window with its map wrapper object.
I'm using jQuery tabs in the items/browse template to browse Omeka items in specific collections. One tab displays a list of Omeka items and the 2nd tab displays geocoded items on a map. I'm using the geolocation shortcode to accomplish this.
Because Google maps don't display in hidden divs (tabs, accordions, etc.), I'm getting a blank grey box instead of my map. I've read several hacky solutions to initialize or resize the map when the map tab is clicked. And my question is this... Where do I put a script to initialize/resize the map when the tab is clicked?
I would greatly appreciate any pointers you can give me.
Thanks!