cartoj.controls

Reagent wrappers around react-map-gl control components.

All controls accept kebab-case keyword props and an optional :position key
(one of "top-left", "top-right", "bottom-left", "bottom-right").

Usage:
  [controls/navigation-control {:position "top-right"}]
  [controls/geolocate-control  {:position "bottom-right" :track-user-location true}]
  [controls/fullscreen-control {:position "top-left"}]
  [controls/scale-control      {:max-width 100 :unit "metric"}]
  [controls/attribution-control {:compact true}]

attribution-control

(attribution-control & args)
Map attribution control.
Key props: :position, :compact, :custom-attribution.

fullscreen-control

(fullscreen-control & args)
Fullscreen toggle control.
Key props: :position, :container (DOM element to go fullscreen).

geolocate-control

(geolocate-control & args)
Geolocation control.
Key props: :position, :track-user-location, :show-user-heading,
           :show-accuracy-circle, :show-user-location.

navigation-control

(navigation-control & args)
Zoom in/out + compass bearing reset control.
Key props: :position, :show-compass, :show-zoom, :visualize-pitch.

scale-control

(scale-control & args)
Distance scale bar control.
Key props: :position, :max-width (px), :unit ("metric" | "imperial" | "nautical").

terrain-control

(terrain-control & args)
Terrain toggle control.
Key props: :position, :source, :exaggeration.