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
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.
Subscribe
Recent Blog Articles
view all
The state of mobile browsers - PPK in London
Thu, 02 Jul 2009
GeoMaker - Turning web content into maps made easy
Wed, 01 Jul 2009
Tue, 30 Jun 2009
Hacking Up North : Winners of the Sunderland Hack Challenge
Fri, 26 Jun 2009
ConvergeSC web event comes to South Carolina
Wed, 24 Jun 2009
Recent Links
Junta42 blog: News Flash: Guardian Seeks to Grow through Products, Not Content
Fri, 03 Jul 2009
Twitter Approval Matrix - June 2009 - O'Reilly Radar
Thu, 02 Jul 2009
YUI 3.0 with Jonathan LeBlanc from the Yahoo Developer Network | Unmatched Style
Wed, 01 Jul 2009
Yahoo! Search Blog: VoCampers Converge at Yahoo! Headquarters in Sunnyvale
Thu, 25 Jun 2009
Make: Online : Dorkbot London June 23
Mon, 22 Jun 2009
Archives
2009
2008
2007
2006
2005

