[OpenLayers-Users] Map overview..

helmi helmi03 at gmail.com
Thu Nov 12 00:53:14 EST 2009


Try play around with parameter values in your OverviewMap, example:

var layer = new OpenLayers.Layer.WMS( "Malaysia",
                "/tc/tilecache.cgi?",
                {layers: 'basemap', format: 'image/png' }
                );
var ov = new OpenLayers.Control.OverviewMap({minRatio: 16, mapOptions:
{maxResolution: 0.02197265625, minResolution: 0.0000858306884765625},
layers:[layer]});

2009/11/12 Quim Rifà <rifins at gmail.com>

> 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!!
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/c0409e7c/attachment.html


More information about the Users mailing list