-
- All Implemented Interfaces:
public final class POIAnnotationData
Data 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 String
id
private Boolean
isUserGraphic
private Annotation.UserGraphic
userGraphic
private final String
styleKey
private final Location
location
private final String
text
private final Bundle
extrasInfo
-
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 String
getId()
final Boolean
isUserGraphic()
final Unit
setUserGraphic(Boolean isUserGraphic)
final Annotation.UserGraphic
getUserGraphic()
final Unit
setUserGraphic(Annotation.UserGraphic userGraphic)
final String
getStyleKey()
final Location
getLocation()
final String
getText()
final Bundle
getExtrasInfo()
final POIAnnotationData
addStringValue(String key, String value)
Add a string value to the POI annotation. final POIAnnotationData
addFloatValue(String key, Float value)
Add a float value to the POI annotation. final Map<String, String>
getStringValues()
final Map<String, Float>
getFloatValues()
Boolean
equals(Object other)
Integer
hashCode()
-
-
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()
-
-
-
-