Hecl Builder

Easy Mobile Applications

YahooMaps
Download: .jad .jar
no rating Average rating:

MIDP Version: 2.0
Description: Simple yahoo maps demo!
Last updated: Mon Oct 13 14:33:49 +0000 2008 by donus

#-- simple yahoo web-service request

#-- start 
set canvas [lcdui.canvas -title "Yahoo maps..." -autoflush 1 -fullscreen 1 ];
$canvas setcurrent

set WIDTH [$canvas cget -width]
set HEIGHT [$canvas cget -height]


#-- request maps webservice from yahoo
set yahooData [hget [http.geturl "http://local.yahooapis.com/MapsService/V1/mapImage?\
appid=YD-4g6HBf0_JX0yq2IsdnV1Ne9JTpKxQ3Miew--\
&street=701+First+Avenue\
&city=Sunnyvale\
&state=CA\
&image_height=$HEIGHT\
&image_width=$WIDTH"] data]

#-- 
set yahoo [split $yahooData ">"]
set mapurl [lindex [split [lindex $yahoo 2] "<"] 0]

#-- get image data
set pic [hget [http.geturl $mapurl] data]
#-- create image 
set img [lcdui.image -data $pic]
#-- 

[$canvas graphics] image $img [list 0 0]

$canvas flush


Note: If you have trouble with the applets on this site, you might try upgrading your Jave Runtime Environment, in order to get the "Next-Generation Java Plug-In", available for download here: http://download.java.net/jdk6/