|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.services.CloudMadeGeocodingService
public class CloudMadeGeocodingService
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 int |
NETWORK_ERROR
|
static int |
NOT_FOUND
|
static int |
SERVER_ERROR
|
| Constructor Summary | |
|---|---|
CloudMadeGeocodingService(GeocodingResultWaiter resultWaiter,
java.lang.String cloudMadeKey,
java.lang.String endUserId,
WgsPoint around,
java.lang.String aroundAddress,
java.lang.String query,
java.lang.String objectType,
int numberOfElements,
int skip,
WgsBoundingBox bBox,
boolean bBoxOnly,
java.lang.String distance)
CloudMade HTTP Geocoding and Geosearch API service. |
|
CloudMadeGeocodingService(GeocodingResultWaiter resultWaiter,
java.lang.String cloudMadeToken,
WgsPoint around,
java.lang.String aroundAddress,
java.lang.String query,
java.lang.String objectType,
int numberOfElements,
int skip,
WgsBoundingBox bBox,
boolean bBoxOnly,
java.lang.String distance,
java.lang.String cloudMadeKey)
CloudMade HTTP Geocoding and Geosearch API service. |
|
| 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
| Constructor Detail |
|---|
public CloudMadeGeocodingService(GeocodingResultWaiter resultWaiter,
java.lang.String cloudMadeKey,
java.lang.String endUserId,
WgsPoint around,
java.lang.String aroundAddress,
java.lang.String query,
java.lang.String objectType,
int numberOfElements,
int skip,
WgsBoundingBox bBox,
boolean bBoxOnly,
java.lang.String distance)
resultWaiter - listener waiting for search resultscloudMadeKey - CloudMade service key, get from cloudmade.comendUserId - Unique end-user ID, e.g. end-user login. Used for CloudMade tokenaround - Center point of the search area. Used together with distance. around must be an EPSG:4326 coordinate ("latitude,longitude"). Cannot be used together with bbox. If used together with a non-empty search_query, only one may specify an addressaroundAddress - Center point of the search area. Used together with distance. Either around or aroundAddress can be defined. Cannot be used together with bbox. If used together with a non-empty search_query, only one may specify an addressquery - placename to be searched, optional for POI searchobjectType - Limits search results to a specific object type. Full list of object types can be found from CloudMade webnumberOfElements - max number of results to returnskip - Number of results to skip from beginningbBox - Bounding box of the search areabBoxOnly - Used only if bbox is specified. If set to false, the geocoder will return results from the whole planet, but still ranking results from within the specified bbox higher, otherwise only results from within the specified bbox will be returned.distance - Radius of the search area, in meters. Special value closest limits search results to one, closest to the center point of the search area
public CloudMadeGeocodingService(GeocodingResultWaiter resultWaiter,
java.lang.String cloudMadeToken,
WgsPoint around,
java.lang.String aroundAddress,
java.lang.String query,
java.lang.String objectType,
int numberOfElements,
int skip,
WgsBoundingBox bBox,
boolean bBoxOnly,
java.lang.String distance,
java.lang.String cloudMadeKey)
resultWaiter - listener waiting for search resultscloudMadeToken - CloudMade service key, get from cloudmade.com APIaround - Center point of the search area. Used together with distance. around must be an EPSG:4326 coordinate ("latitude,longitude"). Cannot be used together with bbox. If used together with a non-empty search_query, only one may specify an addressaroundAddress - Center point of the search area. Used together with distance. Either around or aroundAddress can be defined. Cannot be used together with bbox. If used together with a non-empty search_query, only one may specify an addressquery - placename to be searched, optional for POI searchobjectType - Limits search results to a specific object type. Full list of object types can be found from CloudMade webnumberOfElements - max number of results to returnskip - Number of results to skip from beginningbBox - Bounding box of the search areabBoxOnly - Used only if bbox is specified. If set to false, the geocoder will return results from the whole planet, but still ranking results from within the specified bbox higher, otherwise only results from within the specified bbox will be returned.distance - Radius of the search area, in meters. Special value closest limits search results to one, closest to the center point of the search areacloudMadeKey - CloudMade service key, get from cloudmade.com| 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 | ||||||||