cartoj.geocoder

Geocoder control component wrapping @maplibre/maplibre-gl-geocoder.

Usage:
  [geocoder/geocoder-control {:position "top-right"}]

The control uses Nominatim for forward geocoding and optionally displays
a Marker at the selected result.

Props:
  :position   — required, one of "top-left" "top-right" "bottom-left" "bottom-right"
  :marker     — boolean or map of Marker props (default true)
  :on-loading — callback (fn [^js evt])
  :on-results — callback (fn [^js evt])
  :on-result  — callback (fn [^js evt])
  :on-error   — callback (fn [^js evt])

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

geocoder-control

(geocoder-control & args)
Reagent component wrapping @maplibre/maplibre-gl-geocoder via useControl.

Required props:
  :position — control position string

Optional props:
  :marker     — boolean or map of Marker props (default true)
  :on-loading — (fn [^js evt])
  :on-results — (fn [^js evt])
  :on-result  — (fn [^js evt])
  :on-error   — (fn [^js evt])

Plus any MaplibreGeocoder options (kebab-case converted to camelCase).