public final class RootMapGroup extends DefaultMapGroup implements DeepHitTestQuery
Modifier and Type | Class and Description |
---|---|
static class |
RootMapGroup.FastUIDLookup
Keeps a cache of all items that have been added to the map for fast UID lookup.
|
DefaultMapGroup.MetaDataMapItemFilter
MapGroup.MapItemsCallback, MapGroup.OnFriendlyNameChangedListener, MapGroup.OnGroupListChangedListener, MapGroup.OnItemCallback<T extends MapItem>, MapGroup.OnItemListChangedListener, MapGroup.OnVisibleChangedListener
_friendlyName, _groups, _items, _visible
metadata
Modifier and Type | Method and Description |
---|---|
MapGroup |
addGroup()
Create and add a MapGroup
|
MapGroup |
addGroup(MapGroup groupIface)
Add a MapGroup
|
MapGroup |
addGroup(MapGroup groupIface,
DeepMapItemQuery query) |
MapGroup |
addGroup(java.lang.String friendlyName)
Create and add a MapGroup with a friendly display name
|
MapItem |
deepFindClosestItem(GeoPoint location,
double threshold,
java.util.Map<java.lang.String,java.lang.String> metadata)
Finds the closest MapItem to the specified point, that falls within the specified threshold.
|
MapItem |
deepFindItem(java.util.Map<java.lang.String,java.lang.String> metadata)
Deep traverse the map group to find an item that matches search constraints.
|
java.util.Collection<MapItem> |
deepFindItems(GeoPoint location,
double radius,
java.util.Map<java.lang.String,java.lang.String> metadata)
Find map items within a given area
|
MapItem |
deepFindUID(java.lang.String uid)
Stock implementation of searching for a UID.
|
MapItem |
deepHitTest(int xpos,
int ypos,
GeoPoint point,
MapView view)
Perform a hit-test for map items
|
java.util.SortedSet<MapItem> |
deepHitTest(MapView mapView,
HitTestQueryParameters params)
Perform a hit-test given a set of query parameters
NOTE: This is called on the GL thread
|
java.util.Collection<MapItem> |
getAllItems()
Get all items with a registered UID
|
boolean |
removeGroupImpl(MapGroup group,
boolean referenceOnly)
Remove a MapGroup if it belongs to this one ;
|
addItemImpl, clearGroups, clearItems, containsItem, deepFindItems, deepFindItems, deepFindMapGroup, deepForEachItem, findClosestItem, findItem, findItems, findItems, findItems, findMapGroup, forEachItem, getChildGroupById, getChildGroups, getFriendlyName, getGroupCount, getItemById, getItemCount, getItems, getMapGroups, getMapItems, getVisible, removeItemImpl, setFriendlyName, setVisible, setVisibleIgnoreChildren
addItem, addOnFriendlyNameChangedListener, addOnGroupListChangedListener, addOnItemListChangedListener, addOnVisibleChangedListener, createMapGroupSerialId, createMarker, deepFindClosestItem, deepFindClosestItem, deepFindClosestItem, deepFindClosestItem, deepFindClosestItem, deepFindGroupByNameBreadthFirst, deepFindGroupByNameDepthFirst, deepFindGroupBySerialIdBreadthFirst, deepFindGroupBySerialIdDepthFirst, deepFindItem, deepFindItems, deepFindItems, deepFindItems, deepFindItemsWithMetaString, deepFindItemsWithMetaString, deepFindItemWithMetaString, deepFindItemWithMetaString, deepFindItemWithSerialId, deepHitTestItems, deepMapItems, deepMapItemsCount, deepMapItemsCount, dispatchFriendlyNameChanged, dispatchGroupAdded, dispatchGroupRemoved, dispatchItemAdded, dispatchItemRemoved, dispatchVisibleChanged, findClosestItem, findClosestItem, findClosestItem, findClosestItem, findClosestItem, findItem, findItems, findItems, findItems, findItemsWithMetaString, findItemWithMetaString, findItemWithMetaString, findItemWithMetaStringImpl, findMapGroup, getItemsRecursive, getParentGroup, getPath, getSerialId, hasItemListChangedListeners, hitTest, hitTestItems, mapItems, mapItemsCount, matchItemWithMetaString, matchItemWithMetaString, matchItemWithMetaString, onAddedNoSync, onRemovedNoSync, removeGroup, removeItem, removeOnFriendlyNameChangedListener, removeOnGroupListChangedListener, removeOnItemListChangedListener, removeOnVisibleChangedListener, search, setDefaultZOrder
copyMetaData, get, getMetaBoolean, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaString, getMetaStringArrayList, hasMetaValue, removeMetaData, setMetaBoolean, setMetaData, setMetaDataImpl, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, toggleMetaData
public MapItem deepFindUID(java.lang.String uid)
deepFindUID
in class DefaultMapGroup
public final MapItem deepFindClosestItem(GeoPoint location, double threshold, java.util.Map<java.lang.String,java.lang.String> metadata)
DeepMapItemQuery
deepFindClosestItem
in interface DeepMapItemQuery
deepFindClosestItem
in class MapGroup
location
- The locationthreshold
- The search threshold, in meters. Only items that are within this distance
from the point are considered. If no threshold is desired, the value
0.0d
should be specified.metadata
- Extra query metadatapublic final java.util.Collection<MapItem> deepFindItems(GeoPoint location, double radius, java.util.Map<java.lang.String,java.lang.String> metadata)
DeepMapItemQuery
deepFindItems
in interface DeepMapItemQuery
deepFindItems
in class MapGroup
location
- Geodetic locationradius
- Radius in metersmetadata
- Extra query metadatapublic java.util.SortedSet<MapItem> deepHitTest(MapView mapView, HitTestQueryParameters params)
DeepHitTestQuery
deepHitTest
in interface DeepHitTestQuery
mapView
- Map view instanceparams
- Hit-test query parameters (location of hit, bounds, etc.)public final MapItem deepHitTest(int xpos, int ypos, GeoPoint point, MapView view)
DeepMapItemQuery
deepHitTest
in interface DeepMapItemQuery
deepHitTest
in class MapGroup
xpos
- X-positionypos
- Y-positionpoint
- Ppoint on the map that was touchedview
- Map viewpublic final MapItem deepFindItem(java.util.Map<java.lang.String,java.lang.String> metadata)
MapGroup
deepFindItem
in interface DeepMapItemQuery
deepFindItem
in class DefaultMapGroup
metadata
- is the map looking for matches with a key and a value.public java.util.Collection<MapItem> getAllItems()
public final MapGroup addGroup(MapGroup groupIface)
DefaultMapGroup
addGroup
in class DefaultMapGroup
groupIface
- the MapGroup to addpublic final MapGroup addGroup(MapGroup groupIface, DeepMapItemQuery query)
public final MapGroup addGroup()
DefaultMapGroup
addGroup
in class DefaultMapGroup
public final MapGroup addGroup(java.lang.String friendlyName)
DefaultMapGroup
addGroup
in class DefaultMapGroup
friendlyName
- the friendly display namepublic final boolean removeGroupImpl(MapGroup group, boolean referenceOnly)
DefaultMapGroup
removeGroupImpl
in class DefaultMapGroup
group
- the MapGroup to removereferenceOnly
- If true
only references to the group should be removed.
This will be the common case when the remove is effected by adding the child to
another group. If false
it is assumed that the group is being
disposed of.