0

I want to be able to set and change Openlayers.Map options after construction, but my results are not expected. Can anyone point out problems with my approach or suggest better way if possible?

http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.OpenLayers.Map

var map = new OpenLayers.Map('map');
map.options = {
                projection: 'EPSG:3112',
                displayProjection: 'EPSG:4326',
                units: 'm',
                maxExtent: new OpenLayers.Bounds(-3237313.46,-5312745.84,3019649.82,-876762.78),                
                resolutions: [12288,6144,3072,1536,768,384]
                };

1 Answer 1

1

Never mind: http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.setOptions

    map.setOptions({
        projection: 'EPSG:3112',
        displayProjection: 'EPSG:4326',
        units: 'm',
        maxExtent: new OpenLayers.Bounds(-3237313.46,-5312745.84,3019649.82,-876762.78),            
        resolutions: [12288,6144,3072,1536,768,384]
        });

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.