FeatureLayer

public final class FeatureLayer extends Object

Data-driven styling features are not available to the Navigation SDK. They exists for compile time compatibility with com.google.android.gms:play-services-maps only.

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
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
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.

Parameters
listener

public String getDatasetId ()

Gets the datasetId of this FeatureLayer.

public FeatureLayer.StyleFactory getFeatureStyle ()

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.

Parameters
listener

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.

Parameters
styleFactory