public class Feature
extends java.util.Observable
KmlPlacemark
and
GeoJsonFeature
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
mId |
Constructor and Description |
---|
Feature(Geometry featureGeometry,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new Feature object
|
Modifier and Type | Method and Description |
---|---|
Geometry |
getGeometry()
Gets the geometry object
|
java.lang.String |
getId()
Gets the id of the feature
|
java.lang.Iterable |
getProperties()
Gets the property entry set
|
java.lang.String |
getProperty(java.lang.String property)
Gets the value for a stored property
|
java.lang.Iterable<java.lang.String> |
getPropertyKeys()
Returns all the stored property keys
|
boolean |
hasGeometry()
Checks if the geometry is assigned
|
boolean |
hasProperties()
Gets whether the placemark has properties
|
boolean |
hasProperty(java.lang.String property)
Checks whether the given property key exists
|
protected java.lang.String |
removeProperty(java.lang.String property)
Removes a given property
|
protected void |
setGeometry(Geometry geometry)
Sets the stored Geometry and redraws it on the layer if it has already been added
|
protected java.lang.String |
setProperty(java.lang.String property,
java.lang.String propertyValue)
Store a new property key and value
|
public Feature(Geometry featureGeometry, java.lang.String id, java.util.Map<java.lang.String,java.lang.String> properties)
featureGeometry
- type of geometry to assign to the featureid
- common identifier of the featureproperties
- map containing properties related to the featurepublic java.lang.Iterable<java.lang.String> getPropertyKeys()
public java.lang.Iterable getProperties()
public java.lang.String getProperty(java.lang.String property)
property
- key of the propertypublic java.lang.String getId()
public boolean hasProperty(java.lang.String property)
property
- key of the property to checkpublic Geometry getGeometry()
public boolean hasProperties()
public boolean hasGeometry()
protected java.lang.String setProperty(java.lang.String property, java.lang.String propertyValue)
property
- key of the property to storepropertyValue
- value of the property to storeprotected java.lang.String removeProperty(java.lang.String property)
property
- key of the property to removeprotected void setGeometry(Geometry geometry)
geometry
- Geometry to set