MOGOS Maps
console
  • Overview
  • API & COMPONENT
    • Maps
      • Map Control
        • Sources
        • Bounds
        • Zoom
        • Center
        • Rotate
        • Tilt
        • Flyto
        • Solid
        • Languages
        • Theme
        • Event Once
        • Event On/Off
      • Layer Control
        • Layers
        • Filters
        • Property
        • The specifation of layer style
          • Fill
          • Line
          • Circle
          • Symbol
      • Map UI
      • Map Utilities
        • Rectangle
        • Circle
        • Polyline
        • Polylgon
        • Area
        • Distance
        • Marker
          • Members
    • Search
      • Name
      • Category
      • Address
      • Postal Code
      • Geocoding
    • Route
      • General Vehicles
      • Motorbike
      • Bicycle
      • Pedestrian
      • Truck
      • Public Transportation
    • Logistics & Delivery
      • Route including multiple waypoints
      • Route as optimized order for multiple waypoints
      • Route as optimized order for transportation of logistics
      • Route as optimized order for delivery
      • Predicted route which is certain time in the future
    • Fleet Management
      • Realtime location tracking
      • Moving trajectory analysis
      • Driving road pattern analysis
      • Driver behavior analysis
      • Geofencing
      • Road snap
  • Help
    • Get your API Key
    • Troubleshooting
  • The last versions
    • MOGOS Maps API
      • MOGOS Maps API V1.0
Powered by GitBook

©MOGOS 2023

On this page
  • setPaintProperty
  • getPaintProperty
  • setLayerProperty
  • getLayerProperty
  1. API & COMPONENT
  2. Maps
  3. Layer Control

Property

setPaintProperty

map.setPaintProperty(layerId, name, value);

Parameters

Parameter (Required)
Description
Remark

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

Parameter
Description
Remark

Example

map.setPaintProperty('my-layer', 'fill-color', '#faafee');

getPaintProperty

map.getPaintProperty(layerId, name);

Parameters

Parameter (Required)
Description
Remark

layerID

The ID of the layer to get the paint property from.

String

name

The name of the paint property to set.

String

Returns

Parameter
Description
Remark

Example

const paintProperty = map.getPaintProperty('mySymbolLayer', 'icon-color');

setLayerProperty

map.setLayoutProperty(layerId, name, value);

Parameters

Parameter (Required)
Description
Remark

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

Parameter
Description
Remark

Example

map.setLayoutProperty('my-layer', 'visibility', 'none');

getLayerProperty

map.getLayoutProperty(layerId, name);

Parameters

Parameter (Required)
Description
Remark

layerID

The ID of the layer to get the layout property from.

String

name

The name of the layout property to get.

String

Returns

Parameter
Description
Remark

Example

const layoutProperty = map.getLayoutProperty('mySymbolLayer', 'icon-anchor');

PreviousFiltersNextThe specifation of layer style

Last updated 2 years ago

The MOGOS Maps API requires an API Key, which can be obtained from the website or contact .

MOGOS Console
sales@mogoscorp.com