java.lang.Object | |
↳ | com.carto.vectorelements.VectorElement |
![]() |
![]() |
A base class for all vector elements (points, lines, texts, models, etc).
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
containsMetaDataKey(String key)
Returns true if the specified key exists in the vector element meta data map.
| ||||||||||
synchronized void | delete() | ||||||||||
boolean |
equals(Object obj)
Checks if this object is equal to the specified object.
| ||||||||||
MapBounds |
getBounds()
Returns the bounds of this vector element.
| ||||||||||
Geometry |
getGeometry()
Returns the geometry object that defines the location of this vector element.
| ||||||||||
long |
getId()
Returns the internal id of this vector element.
| ||||||||||
StringVariantMap |
getMetaData()
Returns a copy of the vector element meta data map.
| ||||||||||
Variant |
getMetaDataElement(String key)
Returns a meta data element corresponding to the key.
| ||||||||||
int |
hashCode()
Returns the hash value of this object.
| ||||||||||
boolean |
isVisible()
Returns the state of the visibility flag of this vector element.
| ||||||||||
void |
notifyElementChanged()
Notifies this vector element's datasource about the change in this element.
| ||||||||||
void |
setId(long id)
Sets the internal id for this vector element.
| ||||||||||
void |
setMetaData(StringVariantMap metaData)
Sets a new meta data map for the vector element.
| ||||||||||
void |
setMetaDataElement(String key, Variant element)
Adds a new key-value pair to the meta data map.
| ||||||||||
void |
setVisible(boolean visible)
Sets the state of the visibility flag for this vector element.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns true if the specified key exists in the vector element meta data map.
key | The key to check. |
---|
Checks if this object is equal to the specified object.
obj | The reference object. |
---|
Returns the bounds of this vector element.
Returns the geometry object that defines the location of this vector element.
Returns the internal id of this vector element.
Returns a copy of the vector element meta data map. The changes you make to this map are NOT reflected in the actual meta data of the element.
Returns a meta data element corresponding to the key. If no value is found null variant is returned.
key | The key to use. |
---|
Returns the hash value of this object.
Returns the state of the visibility flag of this vector element.
Notifies this vector element's datasource about the change in this element.
The data source may then notify the layer to update the view.
Sets the internal id for this vector element. The id is used for internal caching, and
should not be changed by the user. User id can added to meta data as a key-value pair.
id | The new internal id for this vector element. |
---|
Sets a new meta data map for the vector element. Old meta data values will be lost.
metaData | The new meta data map for this vector element. |
---|
Adds a new key-value pair to the meta data map. If the key already exists in the map,
it's value will be replaced by the new value.
key | The new key. |
---|---|
element | The new value. |
Sets the state of the visibility flag for this vector element. If set to false the element will not be
drawn.
visible | The new state of the visibility flag for the vector element. |
---|