I have been using the Inline Google Maps plugin on the MacDolphins site but lately it has been flaky to say the least. Sometimes the Google Map is displayed and sometimes it isn’t. There isn’t any real rhyme or reason as to when it displays and when it doesn’t that I could find AND the plugin is actually hard to use, particularly for the casual author.
So I implemented a new short code for Google Maps called wpst_google_map which will take an address as an argument and display a Google Map. The plugin uses this as part of the Club Profile to map a swim club for directions and such. The short code is based on a Google Maps class called Phoogle Maps which has been extended to work with the plugin. Phoogle Maps works pretty much as advertised. I wish it didn’t echo it’s output directly to the output buffer but fortunately PHP can control the output buffer so it can be captured and used in the context of the plugin.
[wpst_google_map address="1600 Pennsylvania Ave, Washington DC, 20006" align="center"]
The short code syntax above will display a map similar to this: