public class GLMapMarkerLayer extends GLMapDrawObject
GLMapMarkerLayer displays a markers with given style.
It could display thousands of markers and optionally cluster them.| Modifier and Type | Class and Description |
|---|---|
static interface |
com.glmapview.GLNativeObject.Type |
| Constructor and Description |
|---|
GLMapMarkerLayer(GLMapVectorObjectList objects,
GLMapVectorCascadeStyle cascadeStyle,
GLMapMarkerStyleCollection styleCollection,
double clusteringRadius,
int drawOrder)
Initializes
GLMapMarkerLayer with given vector objects and `style` |
GLMapMarkerLayer(java.lang.Object[] markers,
GLMapMarkerStyleCollection styleCollection,
double clusteringRadius,
int drawOrder)
Initializes
GLMapMarkerLayer with given markers and `styleCollection` |
| Modifier and Type | Method and Description |
|---|---|
void |
changeStyle(GLMapMarkerStyleCollection styleCollection)
Change style of layer
|
void |
dispose() |
boolean |
haveObject(java.lang.Object marker)
Checks if given marker is added to layer
|
void |
modify(java.lang.Object[] newMarkers,
java.util.Set<java.lang.Object> markersToRemove,
java.util.Set<java.lang.Object> markersToReload,
boolean animated,
java.lang.Runnable onComplete)
Adds or removes markers on layer
|
java.lang.Object[] |
objectsNearPoint(GLMapView mapView,
MapPoint point,
double distanceInPoints)
Searches nearest object or cluster of objects at given mapView
Note that GLMapView must be dispalyed on screen to calculate distances.
|
getDrawOrderpublic GLMapMarkerLayer(java.lang.Object[] markers,
GLMapMarkerStyleCollection styleCollection,
double clusteringRadius,
int drawOrder)
GLMapMarkerLayer with given markers and `styleCollection`markers - Array of marker objects. Usually you set objects with data, that you need to display on map.styleCollection - A style collection object used to display markers.drawOrder - Draw order used to sort objects on mapclusteringRadius - Radius of clustering in points. If 0 marker clustering will be disabledpublic GLMapMarkerLayer(GLMapVectorObjectList objects, GLMapVectorCascadeStyle cascadeStyle, GLMapMarkerStyleCollection styleCollection, double clusteringRadius, int drawOrder)
GLMapMarkerLayer with given vector objects and `style`objects - Array of marker objects. Usually you set objects with data, that you need to display on map.cascadeStyle - A cascadeStyle that defines what style use for markers and unionsstyleCollection - A style collection object used to display markers.drawOrder - Draw order used to sort objects on mapclusteringRadius - Radius of clustering in points. If 0 marker clustering will be disabledpublic java.lang.Object[] objectsNearPoint(GLMapView mapView, MapPoint point, double distanceInPoints)
mapView - map view where layer is displayedpoint - point where object(s) will be searcheddistanceInPoints - maximum hit distance in pointspublic boolean haveObject(java.lang.Object marker)
marker - marker to checkpublic void modify(java.lang.Object[] newMarkers,
java.util.Set<java.lang.Object> markersToRemove,
java.util.Set<java.lang.Object> markersToReload,
boolean animated,
java.lang.Runnable onComplete)
newMarkers - markers that should be addedmarkersToRemove - markers that should be removedmarkersToReload - markers that should be reloadedanimated - deleting or adding single markers will be animatedonComplete - called when operation is finishedpublic void changeStyle(GLMapMarkerStyleCollection styleCollection)
styleCollection - new style for layerpublic void dispose()
Copyright © 2017 GetYourMap. All Rights Reserved.