-
- All Implemented Interfaces:
public final class POIAnnotationDataData class representing parameters for creating POI (Point of Interest) annotations on the map.
This class encapsulates all the necessary information to create, display, and update a POI annotation. It supports both custom graphics and style-based rendering, and provides a flexible way to store/update additional dynamic properties through string and float value maps.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate BooleanisUserGraphicprivate Annotation.UserGraphicuserGraphicprivate final StringstyleKeyprivate final Locationlocationprivate final Stringtextprivate final BundleextrasInfo
-
Constructor Summary
Constructors Constructor Description POIAnnotationData(String id, Boolean isUserGraphic, Annotation.UserGraphic userGraphic, String styleKey, Location location, String text, Bundle extrasInfo)
-
Method Summary
Modifier and Type Method Description final StringgetId()final BooleanisUserGraphic()final UnitsetUserGraphic(Boolean isUserGraphic)final Annotation.UserGraphicgetUserGraphic()final UnitsetUserGraphic(Annotation.UserGraphic userGraphic)final StringgetStyleKey()final LocationgetLocation()final StringgetText()final BundlegetExtrasInfo()final POIAnnotationDataaddStringValue(String key, String value)Add a string value to the POI annotation. final POIAnnotationDataaddFloatValue(String key, Float value)Add a float value to the POI annotation. final Map<String, String>getStringValues()final Map<String, Float>getFloatValues()Booleanequals(Object other)IntegerhashCode()-
-
Constructor Detail
-
POIAnnotationData
POIAnnotationData(String id, Boolean isUserGraphic, Annotation.UserGraphic userGraphic, String styleKey, Location location, String text, Bundle extrasInfo)
- Parameters:
id- unique id for the search POI, make sure it's unique so that we can identify the annotationisUserGraphic- true if using a custom graphic for the annotation, false if using a style keyuserGraphic- the custom graphic for the annotation, used if isUserGraphic is truestyleKey- the style key for the annotation, used if isUserGraphic is falselocation- the location of the POItext- the text to display on the annotationextrasInfo- additional information for the location, can be used to store extra data@author jiquan.zhong on 2025/6/17
-
-
Method Detail
-
isUserGraphic
final Boolean isUserGraphic()
-
setUserGraphic
final Unit setUserGraphic(Boolean isUserGraphic)
- Parameters:
isUserGraphic- true if using a custom graphic for the annotation, false if using a style key
-
getUserGraphic
final Annotation.UserGraphic getUserGraphic()
-
setUserGraphic
final Unit setUserGraphic(Annotation.UserGraphic userGraphic)
- Parameters:
userGraphic- the custom graphic for the annotation, used if isUserGraphic is true
-
getStyleKey
final String getStyleKey()
-
getLocation
final Location getLocation()
-
getExtrasInfo
final Bundle getExtrasInfo()
-
addStringValue
final POIAnnotationData addStringValue(String key, String value)
Add a string value to the POI annotation.
- Parameters:
key- the key for the string valuevalue- the string value to add return itself for chaining
-
addFloatValue
final POIAnnotationData addFloatValue(String key, Float value)
Add a float value to the POI annotation.
- Parameters:
key- the key for the float valuevalue- the float value to add
-
getStringValues
final Map<String, String> getStringValues()
-
getFloatValues
final Map<String, Float> getFloatValues()
-
-
-
-