Sunday, March 5. 2006Get your geo plugin hereTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Cool! But why the PHP deserialization and JSON reserialization?
Am I missing something or can you switch to format=json and switch to a straight echo file_get_contents($src); instead?
I didn't check the docs, but this seems to work for me:
http://api.local.yahoo.com/MapsService/V1/mapImage?appid=rlerdorf&location=SFO&output=json&image_width=300&image_height=300&zoom=7
True, but if you check:
http://developer.yahoo.net/maps/rest/V1/mapImage.html and http://developer.yahoo.net/maps/rest/V1/geocode.html You will see that this is not documented, so relying on it at this point would be a bad idea. But yes, you are right, you could pass the json straight through, of course.
Hum... I'll let McManus know his docs are out of date. :)
When I try it with "Vienna" I get a flood of JavaScript errors. The output of the post to /php/ymap/yajax.php is:
Warning: file_get_contents(http://api.local.yahoo.com/MapsService/V1/mapImage?appid=rlerdorf&location=vienna&output=php&image_width=300&image_height=300&zoom=7) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /var/www/lerdorf.com/php/ymap/yajax.php on line 7 false and then it tries to post again and again and ... |
Why a toys page?I love geeky toys and people are always asking me about them. So this page is where I keep track of the gadgets that interest me.
QuicksearchMy LinksPopular EntriesTemplate dropdownBlog AdministrationCreative Commons |