Represents a map layer containing features of a specific FeatureType
whose
style can be overridden on the client.
Nested Class Summary
interface | FeatureLayer.OnFeatureClickListener | A user-defined function that will be used to
handle FeatureClickEvent . |
|
interface | FeatureLayer.StyleFactory | The style factory function applied to every polygon in the affected feature layer. |
Public Method Summary
void |
addOnFeatureClickListener(FeatureLayer.OnFeatureClickListener
listener)
Sets a listener to respond to click events.
|
String |
getDatasetId()
Gets the
datasetId of this FeatureLayer .
|
FeatureLayer.StyleFactory |
getFeatureStyle()
Returns the
FeatureLayer.StyleFactory of this FeatureLayer
|
String |
getFeatureType()
Returns the
FeatureType
of this FeatureLayer
|
boolean |
isAvailable()
Returns whether this
FeatureLayer
is available, which requires the data-driven styling capability to be available
and the FeatureLayer
to be enabled in the Cloud Console for the map style associated with this map's
ID.
|
void |
removeOnFeatureClickListener(FeatureLayer.OnFeatureClickListener
listener)
Removes a listener for this
FeatureLayer .
|
void |
setFeatureStyle(FeatureLayer.StyleFactory
styleFactory)
Sets a
FeatureLayer.StyleFactory that will be used to style this
FeatureLayer .
|
Inherited Method Summary
Public Methods
public void addOnFeatureClickListener (FeatureLayer.OnFeatureClickListener listener)
Sets a listener to respond to click events. Click events will not be triggered if
this FeatureLayer
is not available.
public String getDatasetId ()
Gets the datasetId
of this FeatureLayer
.
public FeatureLayer.StyleFactory getFeatureStyle ()
Returns the FeatureLayer.StyleFactory
of this FeatureLayer
public String getFeatureType ()
Returns the FeatureType
of this FeatureLayer
public boolean isAvailable ()
Returns whether this FeatureLayer
is available, which requires the data-driven styling capability to be available and the
FeatureLayer
to be enabled in the Cloud Console for the map style associated with this map's ID. If
this is false, styling on this FeatureLayer
returns to default and the click listeners are not called.
public void removeOnFeatureClickListener (FeatureLayer.OnFeatureClickListener listener)
Removes a listener for this FeatureLayer
.
public void setFeatureStyle (FeatureLayer.StyleFactory styleFactory)
Sets a FeatureLayer.StyleFactory
that will be used to style this FeatureLayer
.
If this FeatureLayer
is not available, styles will not be applied.