Yahoo! Static Maps Wordpress Plugin v0.101
Download this plugin
Description:
For a wordpress based project I’m working on, I wanted to include location maps that would load on my phone. This ruled out Google maps, because the API specifies that you have to load them via AJAX. Yahoo! has a Map Image API which doesn’t require javascript, allows for static maps, and even has an option to return the results as serialized PHP*.
So I grabbed the excellent Inline Google Maps plugin, tweaked it to use the Yahoo! API, and set it up to pull from custom fields instead of the image title tag.
Some of the obvious shortcomings that I will work on if possible, and if there is any interest:
- I removed the multi-language support from Inline Google Maps
- Yahoo Maps are US only
- I did not include Zip Code support
- Map always renders at the end of the post
I welcome comments, feature requests, etc. Please note that this is an 0.1 release, so it is quite likely to be buggy. I hope that it will be of use to someone other than just myself.
*the server I’m hosting the project on is running PHP 4.4, which doesn’t support the SimpleXML extension, and I only have one result to handle in each set, so unserialize() is nice to have.
Use:
Place yahoomaps.php in your plugins directory. Activate plugin.
Add these custom fields: Address, City, and State. I use Ryhmed Code’s Custom Field GUI plugin, but this can also be done manually.
Now, your post will have a Yahoo! map at the end, if Address, City, and State have all been filled in.
February 3rd, 2007 at 8:10 pm
[...] Yahoo! Static Maps renders a static inline Yahoo! map when a post has Address, City and State custom fields defined. No javascript required for this plugin. (No Ratings Yet) Loading … [...]
February 4th, 2007 at 9:55 am
Great idea! I need something like this, however, after downloadin and placing into action I get no map. it is activated but nothing shows up. Is there something else I should be doing?
It is being used at http://www.a-affordablebailbonds.com/BailBondsBlog you can see I have my post their with the address but no map. Any help would be great
Thanks
TOby
February 4th, 2007 at 10:30 am
Hi Toby - I will update the instructions on this page later today (headed out the door for breakfast right now), but for now, read the instructions in the plugin file itself, and see if that helps. (You need set up a Yahoo! Maps API key, and then create the custom fields “Address” “City” and “State” )
February 4th, 2007 at 2:47 pm
Use:
Place yahoomaps.php in your plugins directory. Activate plugin.
Get a Yahoo! API Key at https://developer.yahoo.com/wsregapp/index.php
Add these custom fields: Address, City, and State. I use Ryhmed Code’s Custom Field GUI plugin
(http://rhymedcode.net/projects/custom-field-gui), but this can also be done manually (http://codex.wordpress.org/Using_Custom_Fields).
Now, your post will have a Yahoo! map at the end, if Address, City, and State have all been filled in
February 4th, 2007 at 7:55 pm
This is almost working for me. Using custom fields would seem to be a better system then using links like Inline Google Maps (consider entering your plugin in the best use of custom fields contest). I am using the new Ella release. It appears to be trying to work but then fails leaving only the Address field shown on the page. It does not seem to be getting the City and State info.
February 4th, 2007 at 9:42 pm
skarld and Toby - thanks for the beta testing! I have replaced the contents of the zip file with version 0.101, fixing the city/state bug.
February 6th, 2007 at 7:34 am
I am still having the same problem. I have tried using commas in the data fields (Address, City, State) and without. It still only seems to be getting the Address. I have a lot of plugins running, they are shown in the sidebar.