The cljs-map-pins core namespace.
The cljs-map-pins core namespace.
(add-controls! m {controls :controls})Adds passed OpenLayers ol.control.Control instances to the given map.
Adds passed OpenLayers ol.control.Control instances to the given map.
(create-feature {coords :coordinates img :img :as feature})Creates a ol.Feature instance from the feature map. It assigns the ol.geom.Point instance with the feature coordinates and ol.style.Style instance with the ol.style.Icon for the given feature image path.
Creates a ol.Feature instance from the feature map. It assigns the ol.geom.Point instance with the feature coordinates and ol.style.Style instance with the ol.style.Icon for the given feature image path.
(draw-pins! map-element ol-options features handlers)Draws a map in the passed HTML element. The element must have non-zero width and height for the map to show. Takes a map of Open Layers options and passes it to the ol.Map instance. Draws all the features from the features vector and assigns the appropriate handlers from the handlers map. Throws an exception if any of the parameters don't match their respective Schema.
Draws a map in the passed HTML element. The element must have non-zero width and height for the map to show. Takes a map of Open Layers options and passes it to the ol.Map instance. Draws all the features from the features vector and assigns the appropriate handlers from the handlers map. Throws an exception if any of the parameters don't match their respective Schema.
(feature-event-handler handlers)Returns an event-handling function that will be called by OpenLayers when a feature is clicked on the map. The function will retrieve a FeatureHandler instance that is mapped to the feature type keyword and execute its handling function. If there are no feature for the type executes the default handler.
Returns an event-handling function that will be called by OpenLayers when a feature is clicked on the map. The function will retrieve a FeatureHandler instance that is mapped to the feature type keyword and execute its handling function. If there are no feature for the type executes the default handler.
Protocol describing the behavior of a map feature on-click handler.
Protocol describing the behavior of a map feature on-click handler.
(handle this feature)A Schema describing the map of features that will be drawn on the map.
A Schema describing the map of features that will be drawn on the map.
(features-valid? features)A function asserting the validity of map features map against the Features Schema.
A function asserting the validity of map features map against the Features Schema.
A Schema describing the map of map feature handlers. There can be as many handlers as there are feature types with additional two handlers: one default and one used when there are no features in the on-click event.
A Schema describing the map of map feature handlers. There can be as many handlers as there are feature types with additional two handlers: one default and one used when there are no features in the on-click event.
(handlers-valid? handlers)A function validating the feature handlers map against the Handlers Schema.
A function validating the feature handlers map against the Handlers Schema.
(map-on-click-handler! map {noop :no-feature :as handlers})Creates an on-click event handler and assigns it to the map. Calls the feature-event-handler function when there is a feature on the clicked pixel otherwise executes the no-op handler supplied in the handlers map.
Creates an on-click event handler and assigns it to the map. Calls the feature-event-handler function when there is a feature on the clicked pixel otherwise executes the no-op handler supplied in the handlers map.
(map-on-feature-pointer-handler! m map-element)Creates an event handler and assigns it to the map. It will change the pointer style to 'hand' when mouse crosses over a feature on the map.
Creates an event handler and assigns it to the map. It will change the pointer style to 'hand' when mouse crosses over a feature on the map.
(ol-options-valid? ol-options)A function asserting the validity of OpenLayers options against OLOpts Schema.
A function asserting the validity of OpenLayers options against OLOpts Schema.
A Schema describing the OpenLayers options map used for map drawing. This is direct copy from here: https://openlayers.org/en/latest/apidoc/module-ol_View-View.html
A Schema describing the OpenLayers options map used for map drawing. This is direct copy from here: https://openlayers.org/en/latest/apidoc/module-ol_View-View.html
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |