Package com.google.maps.android.data
Class Feature
- java.lang.Object
-
- java.util.Observable
-
- com.google.maps.android.data.Feature
-
- Direct Known Subclasses:
GeoJsonFeature
,KmlPlacemark
public class Feature extends java.util.Observable
An abstraction that shares the common properties ofKmlPlacemark
andGeoJsonFeature
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry
getGeometry()
Gets the geometry objectjava.lang.String
getId()
Gets the id of the featurejava.lang.Iterable
getProperties()
Gets the property entry setjava.lang.String
getProperty(java.lang.String property)
Gets the value for a stored propertyjava.lang.Iterable<java.lang.String>
getPropertyKeys()
Returns all the stored property keysboolean
hasGeometry()
Checks if the geometry is assignedboolean
hasProperties()
Gets whether the placemark has propertiesboolean
hasProperty(java.lang.String property)
Checks whether the given property key exists
-
-
-
Constructor Detail
-
Feature
public Feature(Geometry featureGeometry, java.lang.String id, java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new Feature object- Parameters:
featureGeometry
- type of geometry to assign to the featureid
- common identifier of the featureproperties
- map containing properties related to the feature
-
-
Method Detail
-
getPropertyKeys
public java.lang.Iterable<java.lang.String> getPropertyKeys()
Returns all the stored property keys- Returns:
- iterable of property keys
-
getProperties
public java.lang.Iterable getProperties()
Gets the property entry set- Returns:
- property entry set
-
getProperty
public java.lang.String getProperty(java.lang.String property)
Gets the value for a stored property- Parameters:
property
- key of the property- Returns:
- value of the property if its key exists, otherwise null
-
getId
public java.lang.String getId()
Gets the id of the feature- Returns:
- id
-
hasProperty
public boolean hasProperty(java.lang.String property)
Checks whether the given property key exists- Parameters:
property
- key of the property to check- Returns:
- true if property key exists, false otherwise
-
getGeometry
public Geometry getGeometry()
Gets the geometry object- Returns:
- geometry object
-
hasProperties
public boolean hasProperties()
Gets whether the placemark has properties- Returns:
- true if there are properties in the properties map, false otherwise
-
hasGeometry
public boolean hasGeometry()
Checks if the geometry is assigned- Returns:
- true if feature contains geometry object, otherwise null
-
-