Standard OpenLayers controls
See original GitHub issueCurrently VueLayers doesn’t has any components for OpenLayers standard controls. And the only way
to work with them is through underlying ol.Map
instance of the vl-map
component.
The main goal is to implement an all standard controls to easily work with them as Vue components:
-
vl-control-attribution
-> Attribution -
vl-control-fullscreen
-> FullScreen -
vl-control-mouse-position
-> MousePosition -
vl-control-overview-map
-> OverviewMap -
vl-control-rotate
-> Rotate -
vl-control-scale-line
-> ScaleLine -
vl-control-zoom
-> Zoom -
vl-control-zoom-slider
-> ZoomSlider -
vl-control-zoom-to-extent
-> ZoomToExtent -
vl-control-default-set
(or some another name) - an extra meta component that will includes standard OpenLayers enabled controls ol/control/defaults
Also an basic control
mixin as a base type for all controls should be implemented to allow easy extending.
Usage example:
// by default nothing is enabled
<vl-map ...></vl-map>
// map with default set of controls
<vl-map ...>
<vl-control-default-set ...></vl-control-default-set>
</vl-map>
// map with custom controls markup
<vl-map ...>
<vl-control-zoom ...></vl-control-zoom>
<vl-control-scale-line ...></vl-control-scale-line>
...
</vl-map>
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
OpenLayers v7.2.2 API - Class: Control
A control is a visible widget with a DOM element in a fixed position on the screen. They can involve user input (buttons),...
Read more >How can I remove standard controls in an OpenLayers-Map?
The map object has a property called controls that is an array of OpenLayers.Control objects. If this property is not explicitly set then ......
Read more >OpenLayers.Control.TransformFeature
Control to transform features with a standard transformation box. Properties. events, {OpenLayers.Events} Events instance for listeners and triggering control ...
Read more >Removing custom controls? - GIS Stack Exchange
but what is the 'displayClass' or the 'CLASS_NAME' in the case of custom controls like my 'drawControls'?. openlayers-2 · mapcontrol · Share.
Read more >Add and customize map controls with Angular 13 ... - Medium
OpenLayers is an open source JavaScript library that is used to add maps to websites. Here you can learn how to update existing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Release as v0.11.5, please upgrade
sorry, I found an error in my example. You should pass array to
addControls
method:To add single control you can use:
mapVm.addControl(new ScaleLine())
UPD: your import of control is correct