|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapServiceListener
This interface provides a callback mechanism for the map service providers to
send information about the service request to applications. Applications
implement this interface and register it in the service request
in MapServiceProvider
to obtain information from the service
provider. The relationship with the MapServiceProvider
methods is described in the MapServiceProvider
class.
Field Summary |
---|
Fields inherited from interface javax.microedition.location.services.ServiceListener |
---|
SERVICE_DATA_LOADING, SERVICE_DATA_LOADING_DONE |
Method Summary | |
---|---|
void |
mapContentUpdated(MapServiceProvider provider,
Map map)
Called by the API implementation when the base map data has changed, for example, due to retrieving new data from network. |
void |
selectionUpdated(MapServiceProvider provider,
GeographicArea[] areas,
Landmark[] landmarks,
Coordinates[] coordinates,
Route[] routes)
Called by the map service provider when an application has requested a selection or multiple selections from the map from the user. |
Methods inherited from interface javax.microedition.location.services.ServiceListener |
---|
configurationCompleted, requestAborted, requestCanceled, requestCompleted, requestError, serviceDataStatus |
Method Detail |
---|
void selectionUpdated(MapServiceProvider provider, GeographicArea[] areas, Landmark[] landmarks, Coordinates[] coordinates, Route[] routes)
Called by the map service provider when an application has requested a selection or multiple selections from the map from the user. The notification contains information about all currently selected items.
The objects returned in this notification must contain
the same information as the items passed in the
MapServiceProvider.displayMap
method. This guarantees that the returned items may be further used in the
other methods in this API. This use can be, for example, managing
LandmarkStore
or navigating through a route.
provider
- the MapServiceProvider
whose selection was updatedareas
- an array of selected areas, an empty array if no area has been
selectedlandmarks
- an array of currently selected Landmark
objects, an empty array if no landmark has been currently selectedcoordinates
- an array Coordinates
objects of currently
selected points, an empty array if no point has been currently
selectedroutes
- an array of currently selected Route
objects,
an empty array if no routes have been currently selectedvoid mapContentUpdated(MapServiceProvider provider, Map map)
Called by the API implementation when the base map data has changed, for
example, due to retrieving new data from network. The updated
Map
object is given as parameter. This is the same instance
that was already retrieved with
MapServiceProvider.getMap
method. An application should refresh its screen after
this callback method is called, and call the Map.renderMap
method again to get more complete map image rendered.
This method is called just to notify that the map content has changed; thus the application does not need to do a screen coordinate refresh to any of the items it is rendering itself.
provider
- the MapServiceProvider
whose map content was updatedmap
- the Map
that has been changed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |