I need to restrict map to a certain extent plus one mile. How to do that?

here is my code


    map.getView().fit(bbox, map.getSize());

    view = new ol.View({
        projection: 'EPSG:27700',
        center: center,
        extent: bbox,
        resolutions: {/* list of resolutions*/},
        resolution: {/* resolution value*/}


The bbox is bounding box for the extent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.