Distance taglib ver. 1.1

    Custom JSP taglib. Tag Distance lets you calculate the distance between two geo points in your web applications. For example this code:
 


<%@ taglib uri="taglib.tld" prefix="d" %>
<html>
...
<d:Distance latitude1="55.75222" longitude1="37.61556" latitude2="59.56" longitude2="30.18" />
...
</html>

calculates the Moscow - Spb distance in kilometers

Tags are:

Distance

Custom tag lets you calculate the distance between two geo points. Attributes are:

1) id Optional parameter. Describes a name for your page scope variable (type is java.lang.Double) for the calculated data. Without this parameter tag just prints data.
2) sourceUnits Optional parameter. Describes a style for source data. Possible values are grads (data in grads) or radians (data in radians). Default value is grads.
3) targetUnits Optional parameter. Possible values are km (distance in kilometers) or miles (distance in miles). Default value is km.
4) latitude1 Describes a latitude for the first point.
5) longitude1 Describes a longitude for the first point.
6) latitude2 Describes a latitude for the second point.
7) longitude2 Describes a longitude for the second point.

for downloading:

Library: distancetag.jar    Description: taglib.tld

 © Coldbeans      Comments?

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

Related links: