Mobile location taglib ver. 1.1


    Custom JSP tags library for mobile developers. Lets you obtain geo coordinates for the given Cell ID. Cell ID is the unique number of a GSM cell for a given operator. Any phone is always connected to some cell, and by knowing this number, you know the Cell, and by knowing the position of the cell, you know where your phone is. There are some accuracy issues, as the cell can cover from several hundreds of meters to several kilometers, but this could be a very good starting point to locate the phone. Tag lets you obtain location data via Ericsson labs mobile location API.
 


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

<c:MobLocation mcc="250" mnc="99" lac="0" cellid="29513" appkey="your_key"/>

<p>Status=<%=pageContext.getAttribute("MobLocationStatus")%>
<br>Latitude=<%=pageContext.getAttribute("MobLocationLat")%>
<br>Longitude=<%=pageContext.getAttribute("MobLocationLng")%>

and you will get this:
 


Status=ok
Latitude=55.669324
Longitude=37.582387166667

Tag requests the database and creates 5 page scope variables (type is java.lang.String):
 
MobLocationStatus - status of the request
MobLocationLat - latitude
MobLocationLng - longitude
MobLocationAccuracy - Uncertainty radius in meter
MobLocationName - name of the cell

Alternatively to mcc (mobile country code) and mnc (mobile network code) pair you can provide an attribute mccmnc (MCC/MNC tuple). In this case the first 3 digits will be used as mcc code and rest of the value as mnc.

You have to provide either mcc and mnc pair or MCC/MNC tuple.

The base of the lac and cellid parameters is 10.

Tags are:

MobLocation

Body tag lets you calculate location data (latitude, longitude) by cell ID. Attributes are:

1) proxyHost Optional attribute. Describes proxy settings for your host
2) proxyPort Optional attribute. Describes proxy settings for your host
3) mcc Optional attribute. Describes a mobile country code (decimal)
4) mnc Optional attribute. Describes a mobile network code (decimal)
5) mccmnc Optional attribute. Describes a MCC/MNC tuple (decimal)
6) lac Optional attribute. Describes a locale area code (decimal)
7) cellid Optional attribute. Describes a value of the cell id
8) appkey Optional attribute. Describes an application key for Ericsson labs API.

for downloading:

Library: moblocationtag.jar    Description: taglib.tld

 © Coldbeans      Comments?

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

Also in Coldtags: