Skip to content

Components

The 38 components of MaplibreX 0.8.0, in the families the library groups them in. Each page lists the component's attributes and events, and runs its example when there is one.

Map 1 component

  • map

    A MapLibre GL JS map whose center, zoom, pitch, bearing and style follow the LiveView's assigns.

    Stable

Markers & popups 2 components

  • marker

    A marker at a coordinate, with an optional popup and dragging that reports the new position.

    Stable
  • popup

    A popup with text or HTML content, placed at a coordinate.

    Stable

Layers 11 components

  • geojson_layer

    Draws GeoJSON data as a fill, line, circle, symbol, heatmap or fill-extrusion layer, with optional clustering and feature events.

    Stable
  • circle_layer

    Draws points from a source as circles.

    Stable
  • line_layer

    Draws lines from a source, such as roads, routes or boundaries.

    Stable
  • fill_layer

    Fills polygons from a source.

    Stable
  • symbol_layer

    Places icons and text labels from a source.

    Stable
  • heatmap_layer

    Shows the density of points from a source as a heatmap.

    Stable
  • fill_extrusion_layer

    Extrudes polygons from a source into 3D shapes, such as buildings.

    Stable
  • background_layer

    Paints the map background with a colour or a pattern.

    Stable
  • hillshade_layer

    Shades relief from a raster DEM source.

    Stable
  • raster_layer

    Shows raster tiles, an image or a video from a source.

    Stable
  • trail

    Draws where a moving marker, or each moving point of a GeoJSON layer, has just been, as a line kept in the browser.

    Stable

Sources 5 components

Images 1 component

  • image

    An image of your own on the map for symbol layers to draw: an icon from a URL, one icon in any colour with sdf, or a pulsing dot.

    Stable

Controls 12 components

  • navigation_control

    Zoom buttons and a compass.

    Stable
  • scale_control

    A scale bar for the current zoom level.

    Stable
  • fullscreen_control

    A button that shows the map in full screen.

    Stable
  • geolocate_control

    A button that centres the map on the user's location, with optional tracking.

    Stable
  • attribution_control

    Shows the attribution of the map's sources.

    Stable
  • terrain_control

    A button that turns 3D terrain on and off.

    Stable
  • control

    Places your own HEEx content in a corner of the map as a control.

    Stable
  • control_button

    A map control button with an icon or your own content, and an active state.

    Stable
  • control_group

    Groups several controls into one map control.

    Stable
  • zoom_range

    Shows its content only between a minimum and a maximum zoom level.

    Stable
  • legend

    Says what the colours and symbols of the map mean, in a corner of the map, and hides and shows layers from its entries.

    Stable
  • layer_switcher

    A button in a corner of the map that opens a panel to choose the base map and turn overlays on and off.

    Stable

3D 2 components

  • terrain

    Renders 3D terrain from a raster DEM source, with adjustable exaggeration.

    Stable
  • sky

    MapLibre's sky above the horizon of a pitched map, with fog over 3D terrain and an atmosphere around a globe.

    Stable

Drawing 1 component

  • draw

    Lets the user draw and edit shapes on the map, such as geofences, from a toolbar of its own or the application's buttons, sends them to the LiveView as GeoJSON, and shows the shapes the LiveView gives it.

    Stable

Advanced 3 components

  • deckgl_layer

    Renders a deck.gl layer over the map; deck.gl is loaded the first time one mounts.

    Stable
  • flow_layer

    Particles that follow a vector field, such as wind or ocean currents, with trails coloured by speed, and the flow at a clicked point.

    Stable
  • custom_layer

    A custom WebGL layer drawn with your own GLSL shaders, whose uniforms follow the LiveView's assigns.

    Stable