Stay organized with collections Save and categorize content based on your preferences.
FeatureLayer interfacegoogle.maps.FeatureLayer
interface
An interface representing a map layer containing features of a specific FeatureType
whose style can be overridden client-side, or have events attached.
featureType
Type: FeatureType
The FeatureType
associated with this FeatureLayer
.
isAvailable
Type: boolean
Whether this FeatureLayer
is available, meaning whether Data-driven styling is available for this map (there is a map ID using vector tiles with this FeatureLayer
enabled in the Google Cloud Console map style.) If this is false (or becomes false), styling on this FeatureLayer
returns to default and events are not triggered.
datasetId optional
Notice: Available only in the v=beta channel.
Type: string optional
The Dataset ID for this FeatureLayer
. Only present if the featureType
is FeatureType.DATASET
.
style optional
Type: FeatureStyleOptions|FeatureStyleFunction optional
The style of Feature
s in the FeatureLayer
. The style is applied when style is set. If your style function updates, you must set the style property again. A FeatureStyleFunction
must return consistent results when it is applied over the map tiles, and should be optimized for performance. Asynchronous functions are not supported. If you use a FeatureStyleOptions
, all features of that layer will be styled with the same FeatureStyleOptions
. Set the style to null
to remove the previously set style. If this FeatureLayer
is not available, setting style does nothing and logs an error.
addListener
addListener(eventName, handler)
eventName
: string
Observed event.handler
: Function
Function to handle events.MapsEventListener
Resulting event listener.
Adds the given listener function to the given event name. Returns an identifier for this listener that can be used with
event.removeListener
.
FeatureStyleFunctionOptions interfacegoogle.maps.FeatureStyleFunctionOptions
interface
Options passed to a FeatureStyleFunction
.
feature
Type: Feature
Feature
passed into the FeatureStyleFunction
for styling.
google.maps.FeatureStyleOptions
interface
These options specify the way the style of a Feature
should be modified on a map.
fillColor optional
Type: string optional
Hex RGB string (like "#00FF00" for green). Only applies to polygon geometries.
fillOpacity optional
Type: number optional
The fill opacity between 0.0 and 1.0. Only applies to polygon geometries.
strokeColor optional
Type: string optional
Hex RGB string (like "#00FF00" for green).
strokeOpacity optional
Type: number optional
The stroke opacity between 0.0 and 1.0. Only applies to line and polygon geometries.
strokeWeight optional
Type: number optional
The stroke width in pixels. Only applies to line and polygon geometries.
Feature interfacegoogle.maps.Feature
interface
An interface representing a vector map tile feature. These are inputs to the FeatureStyleFunction
. Do not save a reference to a particular Feature
object because the reference will not be stable.
google.maps.DatasetFeature
interface
Notice: Available only in the v=beta channel.
An interface representing a feature from a Dataset. The featureType
of a DatasetFeature
will always be FeatureType.DATASET
.
This interface extends Feature
.
google.maps.FeatureMouseEvent
interface
This object is returned from a mouse event on a FeatureLayer
.
This interface extends MapMouseEvent
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4