Liking cljdoc? Tell your friends :D

cartoj.draw

MapboxDraw control component using react-map-gl's useControl hook.

Usage: [draw/draw-control {:position "top-left" :on-create (fn [^js evt] ...) :on-update (fn [^js evt] ...) :on-delete (fn [^js evt] ...)}]

MapboxDraw control component using react-map-gl's useControl hook.

Usage:
  [draw/draw-control {:position "top-left"
                       :on-create (fn [^js evt] ...)
                       :on-update (fn [^js evt] ...)
                       :on-delete (fn [^js evt] ...)}]
raw docstring

compat-csscljs

source

default-stylescljs

source

draw-controlcljs

(draw-control & args)

Reagent component wrapping @mapbox/mapbox-gl-draw via useControl.

Props: :position — control position string (optional) :on-create — callback (fn [^js evt]) — evt.features is a JS array :on-update — callback (fn [^js evt]) — evt.features, evt.action :on-delete — callback (fn [^js evt]) — evt.features :on-render — callback (fn [^js evt ^js draw]) — fires on every internal store render (during drawing AND after mutations). Call (.getAll draw) to read the current FeatureCollection.

All other props are passed to the MapboxDraw constructor (kebab-case keys converted to camelCase).

Returns nil (the control renders nothing to the DOM).

Reagent component wrapping @mapbox/mapbox-gl-draw via useControl.

Props:
  :position   — control position string (optional)
  :on-create  — callback (fn [^js evt])  — evt.features is a JS array
  :on-update  — callback (fn [^js evt])  — evt.features, evt.action
  :on-delete  — callback (fn [^js evt])  — evt.features
  :on-render  — callback (fn [^js evt ^js draw]) — fires on every internal
                store render (during drawing AND after mutations).  Call
                (.getAll draw) to read the current FeatureCollection.

All other props are passed to the MapboxDraw constructor (kebab-case keys
converted to camelCase).

Returns nil (the control renders nothing to the DOM).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close