I have a problem with openlayers controls. I have 2 controls which are perfectly working,
var mousePositionControl = new ol.control.MousePosition({ coordinateFormat: ol.coordinate.createStringXY(6), projection: 'EPSG:4326', // comment the following two lines to have the mouse position // be placed within the map. className: 'custom-mouse-position', target: document.getElementById('mouse-position'), undefinedHTML: 'Haritada degilsiniz.' }); var scaleLine = new ol.control.ScaleLine();...
controls: ol.control.defaults().extend([mousePositionControl, scaleLine])But when I try add fullscreen control as a third one, like this :
var fullScreen = new ol.control.FullScreen();and edit controls like this :
controls: ol.control.defaults().extend([mousePositionControl, scaleLine, fullScreen])it's not working and also I lose map.on('click', function(event)){...} functions.
By the way I try to add only FullScreen control, it works. Have a limitation there of adding controls on Openlayers3?
Thanks.
أكثر...
var mousePositionControl = new ol.control.MousePosition({ coordinateFormat: ol.coordinate.createStringXY(6), projection: 'EPSG:4326', // comment the following two lines to have the mouse position // be placed within the map. className: 'custom-mouse-position', target: document.getElementById('mouse-position'), undefinedHTML: 'Haritada degilsiniz.' }); var scaleLine = new ol.control.ScaleLine();...
controls: ol.control.defaults().extend([mousePositionControl, scaleLine])But when I try add fullscreen control as a third one, like this :
var fullScreen = new ol.control.FullScreen();and edit controls like this :
controls: ol.control.defaults().extend([mousePositionControl, scaleLine, fullScreen])it's not working and also I lose map.on('click', function(event)){...} functions.
By the way I try to add only FullScreen control, it works. Have a limitation there of adding controls on Openlayers3?
Thanks.
أكثر...