[OpenLayers-Users] Map overview..

Quim Rifà rifins at gmail.com
Wed Nov 11 12:48:41 EST 2009


Hi,

I'm new here.. So this is my first post to the list.. And I would like to
know how can I put the overview map. Well, by now I'm adding an overviewmap,
but the zoom of the overview is the maximum zoom of the map.. I mean the
overview has more detail than the main map.

This is my code:

var map;
var options;

function init() {
    options = {
        'projection': "EPSG:23031",
        'SRS': "EPSG:23031",
        'units':'meters',
        'maxExtent': new OpenLayers.Bounds(258000, 4485000, 536000, 4752000)
    };

   var lyrTest= new OpenLayers.Layer.WMS("mtc50", "
http://shagrat.icc.es/lizardtech/iserv/ows?",
        { layers: 'mtc50m',
            'service': "WMS",
            'version': "1.1.1",
            'srs': "EPSG:23031",
            'request': "GetMap",
            'exception': "INIMAGE",
            'format': "image/png"
        }, { isBaseLayer: true });

   map = new OpenLayers.Map('map', options);
   map.resolutions = [1100, 550, 275, 100, 50, 25, 10, 5, 2, 1, 0.5];
   map.addLayer(lyrTest.clone());
   map.zoomToMaxExtent();
   map.addControl(new OpenLayers.Control.Navigation());
   map.addControl(new OpenLayers.Control.MousePosition());
   map.addControl(new OpenLayers.Control.OverviewMap());
}

Thanks!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091111/337d630b/attachment.html


More information about the Users mailing list