The classes in this module need to be seeded with an OpenLayers Map or View.
They do not require it in the constructor, but instead allow for a lazy hook once the Map or View has been created
(say, based on an asynchronously loaded capabilities file).
I.e. you can instantiate them – typically carried in a singleton-style service orchestrating the needed utilities –
and pass them to the rest of the application, wiring your own functionality to them. They will begin working and
emitting data once they are hooked into a map with the setMap or setView methods.
example
E.g. an application could be bootstrapped something like this:
Creates a function which maps the coordinates in a MapBrowserEvent to coordinates in a given CRS, automatically
taking into account with the map view's CRS is.
The classes in this module need to be seeded with an OpenLayers Map or View.
They do not require it in the constructor, but instead allow for a lazy hook once the Map or View has been created (say, based on an asynchronously loaded capabilities file).
I.e. you can instantiate them – typically carried in a singleton-style service orchestrating the needed utilities – and pass them to the rest of the application, wiring your own functionality to them. They will begin working and emitting data once they are hooked into a map with the
setMap
orsetView
methods.E.g. an application could be bootstrapped something like this: