com.netmera.mobile
Class NetmeraGeoLocation

java.lang.Object
  extended by com.netmera.mobile.NetmeraGeoLocation

public class NetmeraGeoLocation
extends java.lang.Object

NetmeraGeoLocation is used to create location with the given latitude and longitude values. It is used to set location into the content and then use it on the search queries.

The example below shows how it is used.

NetmeraGeoLocation location = new NetmeraGeoLocation(41,29);
NetmeraContent content = new NetmeraContent("SampleContent");
content.add("location",location);
content.create();


Constructor Summary
NetmeraGeoLocation()
          Default location where latitude and longitude are 0.0
NetmeraGeoLocation(double latitude, double longitude)
          Creates location with the given latitude and longitude.
 
Method Summary
 double getLatitude()
          Get latitude.
 double getLongitude()
          Get longitude.
 void setLatitude(double latitude)
          Set latitude into the location.
 void setLongitude(double longitude)
          Set longitude into the location.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetmeraGeoLocation

public NetmeraGeoLocation()
Default location where latitude and longitude are 0.0


NetmeraGeoLocation

public NetmeraGeoLocation(double latitude,
                          double longitude)
                   throws NetmeraException
Creates location with the given latitude and longitude.

Parameters:
latitude - must be between the range of (-90,90)
longitude - must be between the range of (-180,180)
Throws:
NetmeraException
Method Detail

getLatitude

public double getLatitude()
Get latitude.

Returns:
the latitude of the given location.

setLatitude

public void setLatitude(double latitude)
                 throws NetmeraException
Set latitude into the location. Latitude must be between the range of (-90.0, 90.0).

Parameters:
latitude - Location's latitude
Throws:
NetmeraException

getLongitude

public double getLongitude()
Get longitude.

Returns:
the longitude of the given location.

setLongitude

public void setLongitude(double longitude)
                  throws NetmeraException
Set longitude into the location. Longitude must be between the range of (-180.0, 180.0).

Parameters:
longitude - Location's longitude
Throws:
NetmeraException