(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.
(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).
(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.
(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.
(count-hexbin-points hexbins)
Counts points collected into hexbins.
Counts points collected into hexbins.
(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.
(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.
(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.
(fitMapBounds map layer-id & [geojson])
Fits map boundaries on rendered features.
Fits map boundaries on rendered features.
(generate-filter-string query flat-form)
Generates query params filters for filtered datasets
Generates query params filters for filtered datasets
(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.
(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.
(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.
(geotype->marker-style {:keys [children] :as field})
Get marker style for field type.
Get marker style for field type.
(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
(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).
(get-rendered-features map layer-id & {:keys [geojson selected-ids]})
(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)
(get-style-properties style-type style-state & {:keys [selected-id stops]})
Get style properties for layer.
Get style properties for layer.
(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.
(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
(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.
(marker->geotype marker)
Returns geotype (:point :line or :shape) based on marker.
Returns geotype (:point :line or :shape) based on marker.
(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.
(register-mapboxgl-mouse-events owner map event-chan id_string style)
Register map mouse events.
Register map mouse events.
(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.
(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.
(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]
(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.
(show-heatmap owner map id_string geojson {:keys [selected-ids]})
Renders heatmap layer on map.
Renders heatmap layer on map.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close