Property
setPaintProperty
map.setPaintProperty(layerId, name, value);
Parameters
layerID
The ID of the layer to set the paint property in.
String
name
The name of the paint property to set.
String
value
The value of the paint property to set. Must be of a type appropriate for the property.
String
Returns
Example
map.setPaintProperty('my-layer', 'fill-color', '#faafee');
getPaintProperty
map.getPaintProperty(layerId, name);
Parameters
layerID
The ID of the layer to get the paint property from.
String
name
The name of the paint property to set.
String
Returns
Example
const paintProperty = map.getPaintProperty('mySymbolLayer', 'icon-color');
setLayerProperty
map.setLayoutProperty(layerId, name, value);
Parameters
layerID
The ID of the layer to set the layout property in.
String
name
The name of the layout property to set.
String
value
The value of the layout property. Must be of a type appropriate for the property.
any
Returns
Example
map.setLayoutProperty('my-layer', 'visibility', 'none');
getLayerProperty
map.getLayoutProperty(layerId, name);
Parameters
layerID
The ID of the layer to get the layout property from.
String
name
The name of the layout property to get.
String
Returns
Example
const layoutProperty = map.getLayoutProperty('mySymbolLayer', 'icon-anchor');
The MOGOS Maps API requires an API Key, which can be obtained from the MOGOS Console website or contact [email protected].
Last updated