clear_layer function

Clear a layer from a map using a proxy

Clear a layer from a map using a proxy

This function allows a layer to be removed from an existing Mapbox GL map using a proxy object.

clear_layer(proxy, layer_id)

Arguments

  • proxy: A proxy object created by mapboxgl_proxy or maplibre_proxy.
  • layer_id: The ID of the layer to be removed.

Returns

The updated proxy object.

  • Maintainer: Kyle Walker
  • License: MIT + file LICENSE
  • Last published: 2025-03-18