|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.services.GeocodingService
public class GeocodingService
Default implementation for geocoding services. Uses default Nutiteq backend for searching.
Additional search parameters can be added to search URL by appending these to baseurl used in service creation.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_URL
URL for default backend. |
static int |
NETWORK_ERROR
|
static int |
NOT_FOUND
|
static java.lang.String |
SEARCH_TYPE_GEOCODING
Search type for geocoding (place search) |
static java.lang.String |
SEARCH_TYPE_POI
Search type for POI search |
static int |
SERVER_ERROR
|
| Constructor Summary | |
|---|---|
GeocodingService(GeocodingResultWaiter resultWaiter,
java.lang.String baseurl,
java.lang.String lang,
WgsPoint searchNear,
java.lang.String query,
java.lang.String searchType,
int[] categories,
int numberOfElements,
boolean gzipResponse)
|
|
| Method Summary | |
|---|---|
void |
addKmlPlaces(KmlService service,
KmlPlace[] read)
|
void |
cancel()
Cancel service execution |
void |
dataRetrieved(byte[] data)
Data for resource retrieved |
void |
execute()
Performe service action |
int |
getCachingLevel()
Define at which level should given resource be cached. |
java.lang.String |
getDefaultIcon()
|
java.lang.String |
getServiceUrl(WgsBoundingBox boundingBox,
int zoom)
Called after if needsUpdate has returned true. |
int |
maxResults()
Maximum number of results returned from this service. |
boolean |
needsUpdate(WgsBoundingBox boundingBox,
int zoom)
Does the service need an update. |
void |
notifyError()
Notify implementing object about retrieval error |
void |
placesAdded()
|
java.lang.String |
resourcePath()
Get path to resource. |
void |
setPlaceReadListener(com.nutiteq.kml.KmlReadListener placeReadListener)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NETWORK_ERROR
public static final int NOT_FOUND
public static final int SERVER_ERROR
public static final java.lang.String SEARCH_TYPE_GEOCODING
public static final java.lang.String SEARCH_TYPE_POI
public static final java.lang.String DEFAULT_URL
| Constructor Detail |
|---|
public GeocodingService(GeocodingResultWaiter resultWaiter,
java.lang.String baseurl,
java.lang.String lang,
WgsPoint searchNear,
java.lang.String query,
java.lang.String searchType,
int[] categories,
int numberOfElements,
boolean gzipResponse)
resultWaiter - object waiting for search resultsbaseurl - baseurl for servicelang - search languagesearchNear - location for searching (in WGS84)query - querysearchType - search type (place search or POI search)categories - possible categories for searchnumberOfElements - number of elements to ask from servergzipResponse - should response be compressed in server. Adds gzip=(yes|no) to
end of url| Method Detail |
|---|
public void execute()
Service
execute in interface Servicepublic java.lang.String resourcePath()
ResourceRequestor
resourcePath in interface ResourceRequestorpublic void notifyError()
ResourceRequestor
notifyError in interface ResourceRequestorpublic void dataRetrieved(byte[] data)
ResourceDataWaiter
dataRetrieved in interface ResourceDataWaiterdata - retrieved data
public void addKmlPlaces(KmlService service,
KmlPlace[] read)
addKmlPlaces in interface com.nutiteq.kml.KmlElementsWaiter
public java.lang.String getServiceUrl(WgsBoundingBox boundingBox,
int zoom)
KmlService
getServiceUrl in interface KmlServiceboundingBox - bounding box for screen view of the map (coordinates in WGS84)zoom - zoom level used
public int maxResults()
KmlService
maxResults in interface KmlService
public boolean needsUpdate(WgsBoundingBox boundingBox,
int zoom)
KmlService
needsUpdate in interface KmlServiceboundingBox - bounding box for new map location (coordinates in WGS84)zoom - current zoom level
public void cancel()
Service
cancel in interface Servicepublic int getCachingLevel()
ResourceRequestorCache
getCachingLevel in interface ResourceRequestorpublic java.lang.String getDefaultIcon()
getDefaultIcon in interface KmlServicepublic void placesAdded()
placesAdded in interface KmlServicepublic void setPlaceReadListener(com.nutiteq.kml.KmlReadListener placeReadListener)
setPlaceReadListener in interface KmlService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||