Liking cljdoc? Tell your friends :D

hatti.map.utils


add-mapboxgl-layercljs

(add-mapboxgl-layer map
                    id_string
                    layer-type
                    &
                    {:keys [layer-id layout paint filter tiles-url]})

Add map layer from available sources.

Add map layer from available sources.
sourceraw docstring

add-mapboxgl-sourcecljs

(add-mapboxgl-source map
                     id_string
                     {:keys [tiles-url geojson cluster clusterRadius
                             clusterMaxZoom]
                      :or {cluster false}})

Add map source. This is called with either tiles-url or geoson which determins the source type (Vector or GeosJSON).

Add map source. This is called with either tiles-url or geoson which
determins the source type (Vector or  GeosJSON). 
sourceraw docstring

apply-click-stylecljs

(apply-click-style marker)
source

apply-hover-stylecljs

(apply-hover-style marker)
source

apply-unclick-stylecljs

(apply-unclick-style marker)
source

as-geojsoncljs

(as-geojson dataset form)
(as-geojson dataset form geofield)

Given the dataset, and the form schema, get out geojson. Optional specification of field will map that field data to the geom.

Given the dataset, and the form schema, get out geojson.
Optional specification of field will map that field data to the geom.
sourceraw docstring

circle-border-idcljs

source

clear-all-stylescljs

(clear-all-styles markers
                  &
                  {:keys [preserve-clicked?] :or {preserve-clicked? true}})

Sets the default style on a marker.

Sets the default style on a marker.
sourceraw docstring

clear-map-stylescljs

(clear-map-styles owner)

Set default style

Set default style
sourceraw docstring

count-hexbin-pointscljs

(count-hexbin-points hexbins)

Counts points collected into hexbins.

Counts points collected into hexbins.
sourceraw docstring

create-mapcljs

(create-map id {:keys [mapbox-tiles include-google-maps?]})

Creates a leaflet map, rendering it to the dom element with given id.

Creates a leaflet map, rendering it to the dom element with given id.
sourceraw docstring

create-mapboxgl-mapcljs

(create-mapboxgl-map id)

Creates a mapboxgl map, rendering it to the dom element with given id.

Creates a mapboxgl map, rendering it to the dom element with given id.
sourceraw docstring

equivalent-stylecljs

(equivalent-style s t)
source

filter-selected-featurescljs

(filter-selected-features features selected-ids)

Filter features and return only selected features. Returns all features features if selected-ids is nil.

Filter features and return only selected features. Returns all features
features if selected-ids is nil. 
sourceraw docstring

fitMapBoundscljs

(fitMapBounds map layer-id & [geojson])

Fits map boundaries on rendered features.

Fits map boundaries on rendered features.
sourceraw docstring

generate-filter-stringcljs

(generate-filter-string query flat-form)

Generates query params filters for filtered datasets

Generates query params filters for filtered datasets 
sourceraw docstring

generate-hexgridcljs

(generate-hexgrid map layer-id geojson {:keys [cell-width selected-ids]})

Generates hexbins with point count aggregation given rendered layer-id or geojson.

Generates hexbins with point count aggregation given rendered
layer-id or geojson.
sourceraw docstring

generate-size-stopscljs

(generate-size-stops selected-id selected-color)

Generates cirlce size property stops base on values from dataset.

Generates cirlce size property stops base on values from dataset.
sourceraw docstring

generate-stopscljs

(generate-stops selected-id selected-color)

Generates a collection of input - output value pairs known as stops. These stops are used by get-styles function to decide the style output based on an input vaue from the dataset. e.g. _id. By defauly this function purely generates color stops.

Generates a collection of input - output value pairs known
as stops. These stops are used by get-styles function to decide the style
output based on an input vaue from the dataset. e.g. _id. By defauly this
 function purely generates color stops.
sourceraw docstring

geotype->marker-stylecljs

(geotype->marker-style {:keys [children] :as field})

Get marker style for field type.

Get marker style for field type.
sourceraw docstring

get-as-geomcljsmultimethod

source

get-filtercljs

(get-filter {:keys [column filter value]} flat-form)

Gets query filter and returns filters based on field type

Gets query filter and returns filters based on field type
sourceraw docstring

get-id-propertycljs

(get-id-property features)
source

get-ona-stylecljs

(get-ona-style marker_or_keyword
               style-type
               &
               {:keys [custom-styles] :or {custom-styles ona-styles}})

Appropriate style given style-type (:normal, :clicked, :hover), and either a leaflet marker or clojurescript keyword (one of :point or :shape).

Appropriate style given style-type (:normal, :clicked, :hover), and
either a leaflet marker or clojurescript keyword (one of :point or :shape).
sourceraw docstring

get-rendered-featurescljs

(get-rendered-features map layer-id & {:keys [geojson selected-ids]})
source

get-stylecljs

(get-style marker)
(get-style marker kw)

Get the style of a marker. Second arg specifies style attribute to get. eg. For marker m1, call like: (get-style m1) or (get-style m1 :fillColor)

Get the style of a marker. Second arg specifies style attribute to get.
eg. For marker m1, call like: (get-style m1) or (get-style m1 :fillColor)
sourceraw docstring

get-style-propertiescljs

(get-style-properties style-type style-state & {:keys [selected-id stops]})

Get style properties for layer.

Get style properties for layer.
sourceraw docstring

get-stylescljs

(get-styles & [selected-id stops size-stops])

Gets predefined styles for diffent layer types and states.

Gets predefined styles for diffent layer types and states.
sourceraw docstring

get-tiles-endpointcljs

(get-tiles-endpoint tiles-server formid fields flat-form & [query])

Generates tiles url with appropriate filters as query params

Generates tiles url with appropriate filters as query params
sourceraw docstring

map-on-loadcljs

(map-on-load map
             event-chan
             id_string
             &
             {:keys [geofield owner tiles-url geojson] :as map-data})

Functions that are called after map is loaded in DOM.

Functions that are called after map is loaded in DOM.
sourceraw docstring

marker->geotypecljs

(marker->geotype marker)

Returns geotype (:point :line or :shape) based on marker.

Returns geotype (:point :line or :shape) based on marker.
sourceraw docstring

ona-stylescljs

source

re-style-markercljs

(re-style-marker marker->style marker)

Apply a style to a marker. Style comes from a function that takes marker.

Apply a style to a marker. Style comes from a function that takes marker.
sourceraw docstring

read-string-or-numbercljs

(read-string-or-number maybe-s)
source

register-mapboxgl-mouse-eventscljs

(register-mapboxgl-mouse-events owner map event-chan id_string style)

Register map mouse events.

Register map mouse events.
sourceraw docstring

remove-layercljs

(remove-layer map id & {:keys [keep-source?]})

Remove layer from map and it's source from map.

Remove layer from map and it's source from map.
sourceraw docstring

reset-stylecljs

(reset-style marker)

Reset styles pulls the 'reset' property from within a markers options, clearing styles to default if nothing found.

Reset styles pulls the 'reset' property from within a markers options,
clearing styles to default if nothing found.
sourceraw docstring

set-mapboxgl-paint-propertycljs

(set-mapboxgl-paint-property map layer-id properties)

Sets maps paint properties given layer-id and list of properties to set. properties should be a list of properties that contains the propery name and value in a vector. e.g. [[property1 value1] [property2 value2]

Sets maps paint properties given layer-id and list of properties to set.
properties should be a list of properties that contains the propery name
and value in a vector. e.g. [[property1 value1] [property2 value2]
sourceraw docstring

set-zoom-levelcljs

(set-zoom-level owner)

Update map zoom level in local component state on zoom event.

Update map zoom level in local component state on zoom event.
sourceraw docstring

show-heatmapcljs

(show-heatmap owner map id_string geojson {:keys [selected-ids]})

Renders heatmap layer on map.

Renders heatmap layer on map.
sourceraw docstring

show-hexbinscljs

(show-hexbins owner
              map
              id_string
              geojson
              {:keys [cell-color extrusion? hide-points?] :as opts})

Renders hexbin layer on map.

Renders hexbin layer on map.
sourceraw docstring

show-hide-pointscljs

(show-hide-points map layer-id & [hide-points?])

Show/or hide geopoints. Hide geopoints if hide-points is true.

Show/or hide geopoints. Hide geopoints if hide-points is true.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close