Yahoo! Developer Network Blog
« Previous | Main | Next »
July 10, 2008
Yahoo Maps on the iPhone
iPhone is creating a craze in Romania, as it's done all over the world. Since Yahoo is very popular in Romania and, moreover, Yahoo! Maps is considered the API to choose for the detailed view of Bucharest, Mobi One and MB Dragan thought of creating the Yahoo! Maps application for iPhone and iPod Touch.
Here is what they have to say about it:
We've created Mobi One Maps because Google Maps (the application available for iPhone) did not have a detailed, street-level map of Bucharest. To do this we used Yahoo! Maps and Mootools.One of the issues we encountered was trying to modify the navigation buttons, since the existent documentation did not mention anything about this situation. So as a solution we used map.panTOXY() as follows:
window.addEvent('domready', function() { var container = map.getContainerSize(); var delta = Math.max(container.width,container.height) / 2; var move_up = new YCoordPoint(container.width / 2, container.height / 2 + delta); var move_down = new YCoordPoint(container.width / 2, container.height / 2 - delta) var move_left = new YCoordPoint(container.width / 2 + delta, container.height / 2); var move_right = new YCoordPoint(container.width / 2 - delta, container.height / 2); $('move_up').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_up); }); $('move_down').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_down); }); $('move_left').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_left); }); $('move_right').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_right); }); });In a previous version we've tried to navigate using the iPhone events (tap, drag and pinch), but through GPRS the map was moving very slow so we had to rule out this solution.
For all the visual effects we've used MootoolsFX.
The application had been accepted by the apple.com editors and posted as "featured web app" in the Travel category for 5 days, now being one of the most popular application from this category.
Bobby Voicu (Yahoo! Romania) and Mihai Dragan (MB Dragan)
Posted at July 10, 2008 6:00 AM | Permalink
Comments
Great application!!! I have just actually tried out to implement the map pinch and drag events via a custom UIWebView BUT facing a huge issue: when zooming out/in and moving, after a while, the tiles do not get refreshed and just see a blank map with the markers...
Have you noticed something of this nature?
Posted by: Olivier at September 18, 2008 11:31 PM
Post a comment
Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service. Fields marked with asterisk '*' are required.
Subscribe
Recent Blog Articles
view all
YQL Open Table for Google Buzz now live
Tue, 09 Feb 2010
INSERT INTO twitter.status ...
Mon, 08 Feb 2010
Announcing the Yahoo! Brasil Open Hack Day 2010, 20-21 March
Mon, 08 Feb 2010
Marketing hacks, linchpins, and tech women of valor
Sun, 07 Feb 2010
Yahoo! India invites you to join the first India Hadoop Summit
Thu, 04 Feb 2010
Recent Links
Appcelerator Titanium + Yahoo YQL on Vimeo
Mon, 08 Feb 2010
Tue, 02 Feb 2010
PhoneGap | Cross platform mobile framework
Sat, 30 Jan 2010
Web developers can rule the iPad - O'Reilly Radar
Sat, 30 Jan 2010
rc3.org - Is the iPad the harbinger of doom for personal computing?
Thu, 28 Jan 2010
Archives
2010
2009
2008
2007
2006
2005
Recent Readers

