MyPlaces (API Reference)
Class MyPlaces
Provides means to populate personal places data source. Also acts as a owner of the collection of personal places. MyPlaces is memory-only object: nothing is persisted and/or sent over the network. Client has full control on how to store personal places.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPlace(GeoPlace place, OnTaskCompleted callback) Adds a place to this data source.addPlaces(List<GeoPlace> places, OnTaskCompleted callback) Adds a list of places to this data source.Gets the list of places which currently belongs to this data source.removeAll(OnTaskCompleted callback) Removes all places from this data source.removePlace(String placeId, OnTaskCompleted callback) Removes a place from this data source.removePlaces(List<String> placeIds, OnTaskCompleted callback) Removes a list of places from this data source.
-
Constructor Details
-
MyPlaces
public MyPlaces()Creates a new instance of this class.
-
-
Method Details
-
addPlace
Adds a place to this data source.
- Parameters:
place-The place.
callback-The callback to be called when task is completed.
- Returns:
Handle that will be used to manipulate the execution of the task.
-
addPlaces
@NonNull public TaskHandle addPlaces(@NonNull List<GeoPlace> places, @NonNull OnTaskCompleted callback) Adds a list of places to this data source.
- Parameters:
places-Places
callback-The callback to be called when task is completed.
- Returns:
Handle that will be used to manipulate the execution of the task.
-
removePlace
Removes a place from this data source.
- Parameters:
placeId-The place id
callback-The callback to be called when task is completed.
- Returns:
Handle that will be used to manipulate the execution of the task.
-
removePlaces
@NonNull public TaskHandle removePlaces(@NonNull List<String> placeIds, @NonNull OnTaskCompleted callback) Removes a list of places from this data source.
- Parameters:
placeIds-Place ids
callback-The callback to be called when task is completed.
- Returns:
Handle that will be used to manipulate the execution of the task.
-
removeAll
Removes all places from this data source.
- Parameters:
callback-The callback to be called when task is completed.
- Returns:
Handle that will be used to manipulate the execution of the task.
-
getPlaces
Gets the list of places which currently belongs to this data source. The returned list is a clone of the internal list and thus changing it has no effect on the data source.
- Returns:
The list of places which currently belong to this data source. This list is a clone of the internal list and thus changing it has no effect on the data source.
-