Yahoo geocode taglib ver. 1.2

    JSP custom taglib lets you perform geocode requests via Yahoo API. This service allows you to find the specific latitude and longitude for an address. For example:
 


<%@ taglib uri="taglib.tld" prefix="g" %>

<g:YahooGeocode appid="YahooDemo" street="701 First Street"
  city="Sunnyvale" state="CA" result="res"/>

<p>Found: <%=res.getLatitude()%> : <%=res.getLongitude()%>

and you will get this:

Found: 37.416386 : -122.02486

Attribute result describes a name for page scope variable with geocode data. Type for this variable is com.cj.yahoo.GeocodeBean. This bean supports the following methods:

getPrecision()
getLatitude()
getLongitude()
getAddress()
getCity()
getState()
getZip()
getCountry()

Tags are:

YahooGeocode

Tag performs geocoding request via Yahoo API. Attributes are:

1) appid Describes application ID (you have to request it from Yahoo).
2) url Optional attribute. Defines an URL for Yahoo API. Default value is http://api.local.yahoo.com/MapsService/V1/geocode.
3) street Optional attribute. Defines a street
4) city Optional attribute. Defines a city
5) state Optional attribute. Defines the United States state
6) zip Optional attribute. Defines a zip code

for downloading:

Library: yahoogeocodetag.jar    Description: taglib.tld

© Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: