1

I want to add a full screen option in my map implemented using OpenLayers. I tried adding it with:

var map1 = new OpenLayers.Map({
        div: 'map',
        projection: new OpenLayers.Projection("EPSG:3857") ,
        controls: OpenLayers.control.defaults().extend([
        new OpenLayers.control.FullScreen()
        ]),       
    });

and also by adding:

map1.addControl(new OpenLayers.control.FullScreen());

But it didn't work.

here is my fiddle:

http://jsfiddle.net/expedio/gmy0rpam/

1 Answer 1

2

You're mixing OpenLayers 2 and 3 here. There is no fullscreen control in version 2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.