I am trying to show map based on the gridset defined in geoserver, in such a manner that map zooms to that Scale only.

Scale is as follow : 1:1000, 1:500, 1:400, 1:300

        view = new ol.View({
            center: [564878.4195196485, 4928488.1371189915],
            zoom: 16,
            projection: projection                

        map = new ol.Map({
            controls: ol.control.defaults({
                attribution: false
            }).extend([mousePositionControl, scale]),
            layers: [L1, L2, L3, L4],
            target: 'map',
            view: view
  • I think, i found the solution from this link – Vikrant Jain Jul 17 '18 at 11:27

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.