[OpenLayers-Users] problem with overviewMap

Michael Shishcu micklesh at gmail.com
Wed Sep 16 01:45:01 EDT 2009


Hi, Valeria.
Not sure if it works, but can you try to create an instance of the overview
map using custom options like
  map.addControl(new OpenLayers.Control.OverviewMap({mapOptions: options}));


also try to construct the map with the same reesolutions, as defined in
tilecache config file

maybe someone else knows better?

2009/9/16 Valeria Muñoz <valemunoz at gmail.com>

> Hi
>
> I connect to a tilecache and this will need to deploy at OverviewMap. For
> some reason I get an error(resolution error) in the "OverviewMap" and shows
> the pink tile
>
> Error:
> An error occurred: can't find resolution index for 0.000146. Available
> resolutions are:
> [0.703125, 0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625,
> 0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625,
> 0.0006866455078125, 0.00034332275390625, 0.000171661376953125,
> 8.58306884765625e-005, 4.291534423828125e-005, 2.1457672119140625e-005,
> 1.0728836059570313e-005, 5.3644180297851563e-006, 2.6822090148925781e-006,
> 1.3411045074462891e-006]
> my code:
>
> var mapOptions = {            restrictedExtent:new
> OpenLayers.Bounds(-113.5546875,-72.421875,-25.6640625,-2.109375,2),
> units: "dd",            numZoomLevels:20};
> map = new OpenLayers.Map('map',mapOptions);
> layer3 = new OpenLayers.Layer.WMS( "OpenLayers WMS",             "
> http://localhost/tilecache/tilecache.cgi", {layers:
> 'ivregion_d02',transitionEffect: 'resize',format: 'png'} );
> map.addLayer(layer3);
> map.addControl(new OpenLayers.Control.MousePosition());
> map.setCenter(new OpenLayers.LonLat(-71.256437, -29.902194), 17);
> if (!map.getCenter()) map.zoomToMaxExtent();
> var overview2 = new OpenLayers.Control.OverviewMap();
> map.addControl(overview2);
>
>
> if somebody can help me?
>
> RG
>
> _______________________________________________
> 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/20090916/627c9e2e/attachment.html


More information about the Users mailing list