Style class
Constructors
Style.fromJsObject (StyleJsImpl jsObject )
Creates a new Style from a jsObject
.
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
jsObject
→ StyleJsImpl
JS object.
final inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
addImage (String id , StyleImage image )
→ dynamic
addLayer (dynamic layerObject , [String ? before , StyleSetterOptions ? options ])
→ dynamic
Add a layer to the map style. The layer will be inserted before the layer with
ID before
, or appended if before
is omitted.
@param {string} before
ID of an existing layer to insert before
addSource (String id , dynamic source , StyleSetterOptions options )
→ dynamic
addSourceType (String name , dynamic sourceType , Function callback )
→ dynamic
getFeatureState (dynamic target )
→ dynamic
getFilter (String layer )
→ dynamic
Get a layer's filter object
@param {string} layer the layer to inspect
@returns {*} the layer's filter, if any
getGlyphs (String mapId , dynamic params , Function callback )
→ dynamic
getImage (String id )
→ StyleImage
getImages (String mapId , dynamic params , Function callback )
→ dynamic
getLayer (String id )
→ dynamic
Return the style layer object with the given id
.
getLayoutProperty (String layerId , String name )
→ dynamic
Get a layout property's value from a given layer
@param {string} layerId the layer to inspect
@param {string} name the name of the layout property
@returns {*} the property value
getLight ()
→ dynamic
getPaintProperty (String layer , String name )
→ dynamic
getResource (String mapId , RequestParameters params , Function callback )
→ dynamic
getSource (String id )
→ dynamic
Get a source by id.
@param {string} id id of the desired source
@returns {Object} source
getTransition ()
→ dynamic
hasTransitions ()
→ dynamic
listImages ()
→ dynamic
loaded ()
→ dynamic
loadJSON (dynamic json , StyleSetterOptions option )
→ dynamic
loadURL (String url , dynamic options )
→ dynamic
moveLayer (String id , [String ? before ])
→ dynamic
Moves a layer to a different z-position. The layer will be inserted before the layer with
ID before
, or appended if before
is omitted.
@param {string} id ID of the layer to move
@param {string} before
ID of an existing layer to insert before
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
querySourceFeatures (String sourceID , dynamic params )
→ dynamic
removeFeatureState (dynamic target , [String ? key ])
→ dynamic
removeImage (String id )
→ dynamic
removeLayer (String id )
→ dynamic
Remove the layer with the given id from the style.
removeSource (String id )
→ dynamic
Remove a source from this stylesheet, given its id.
@param {string} id id of the source to remove
@throws {Error} if no source is found with the given ID
serialize ()
→ dynamic
setFeatureState (dynamic target , dynamic state )
→ dynamic
setFilter (String layerId , dynamic filter , StyleSetterOptions options )
→ dynamic
setGeoJSONSourceData (String id , dynamic data )
→ dynamic
Set the data of a GeoJSON source, given its id.
@param {string} id id of the source
@param {GeoJSON|string} data GeoJSON source
setLayerZoomRange (String layerId , [num ? minzoom , num ? maxzoom ])
→ dynamic
setLayoutProperty (String layerId , String name , dynamic value , StyleSetterOptions options )
→ dynamic
setLight (dynamic lightOptions , StyleSetterOptions options )
→ dynamic
setPaintProperty (String layerId , String name , dynamic value , StyleSetterOptions options )
→ dynamic
setState (dynamic nextState )
→ dynamic
Update this style's state to match the given style JSON, performing only
the necessary mutations.
toString ()
→ String
A string representation of this object.
inherited
update (EvaluationParameters parameters )
→ dynamic
Apply queued style updates in a batch and recalculate zoom-dependent paint properties.
updateImage (String id , StyleImage image )
→ dynamic