Using the ai1ec Google Maps feature in a custom theme
-
I have had to use a custom theme design to operate my events platform and every now and then like to put some new features on the website myself.
I have been trying to implement a Google Maps div under the event information using some of the Code I found whilst rummaging around in the Vortex theme.
Namely:
<?php if ( $map ) : ?>
<div class=”gmaps”><?php echo $map; ?></div>
<?php endif; } ?>With a few CSS tweaks I have it looking ok but when you click to view map only a tiny section is loaded and the parameters seem to be wrong when you scroll around as most of it ends up disappearing on the right after you drag it across.
See here:
Before
https://www.dropbox.com/s/348ofov10mk1zlc/Click%20to%20View%20Map.pngAfter:
https://www.dropbox.com/s/zxtlgpjjxu9v3si/Once%20Clicked.pngThe general consensus on this is to use
google.maps.event.trigger(MapInstance,'resize')
however I’ve put it in as scripts and (to test it) as a button on the page and it doesn’t work.Can anyone see what I’m doing wrong – happy to pastebin some code if anyone wants.
I have not implemented this into the site yet only on my virtualserver so cannot provide a link to show unfortunately.
- The topic ‘Using the ai1ec Google Maps feature in a custom theme’ is closed to new replies.