🐯
Copy of FATOS Developer
Developer SiteConsole
  • Maps
    • Map control
      • Sources
      • Bounds
      • Zoom
      • Center
      • Rotate (Heading)
      • Tilt
      • Flyto
      • Solid (Buildings)
      • Language
      • Theme
      • Event Once
      • Event On/Off
    • Layer Control
    • Map UI
    • Map Utilities
      • Rectangle
      • Circle
      • Polyline
      • Polygon
      • Area
      • Distance
      • Mark
  • Search
    • Name
    • Category
    • Address
    • Geocoding
  • Route
    • Passenger Car
    • Motorbike
    • Truck
    • Public Transportation
    • Bicycle
    • Pedestrian
  • TMS
    • Route with multiple waypoints
    • Route as optimize order of waypoints
    • Route as optimize order of logistics
    • Route as optimize order of delivery
    • Route to predict which is after some time
  • FMS
    • Realtime tracking
    • Driving trajectory analysis
    • Driving road pattern analysis
    • Driver behavior analysis
    • Road snap
    • Geofencing
  • Navigation SDK
    • For Fire Engine
    • For Mobility on Demand
    • For City GAS
  • Get your API Key
  • Troubleshooting
    • FAQ
Powered by GitBook
On this page
  1. Maps

Layer Control

PreviousEvent On/OffNextMap UI

Last updated 2 years ago

Layer control provides functions to set properties of each layer, such as layer addition, deletion, and color and style.

setLayer

Adds a FATOS style layer to the map's style.

map.setLayer(layer, beforlayerID);

Parameter

Required Parameter
Description
Type

id

A unique identifier that you define.

String

source

The data source for the layer. Reference a source that has already been defined using the source's unique id.

String

type

The type of layer (ex. fill or symbol)

String

Optional Parameter
Description
Type

filter

An expression specifying conditions on source features. Only features that match the filter are displayed.

Array

minzoom

The minimum zoom level for the layer.

number

maxzoom

The maximum zoom level for the layer.

number

layout

Object

paint

Paint properties for the layer. Available paint properties vary by layer.type .

Object

beforlayerID

The ID of an existing layer to insert the new layer before, resulting in the new layer appearing visually beneath the existing layer.

String

A list of layer types is available in the

Layout properties for the layer. Available layout properties vary by layer.type . A full list of layout properties for each layer type is available in the

A full list of paint properties for each layer type is available in the

Style Specification
Style Specification
Style Specification
Drawing