If you just leave out the layers parameter alltogether, the overview map will
by default clone the baselayer of your map.
Best regards,
Bart
On Apr 6, 2010, at 9:13 PM, sasamil wrote:
>
> I had a lot of troubles with this, too.
>
> IMHO the problem exists regardless of the layer type (it can be vector, wms,
> wfs,... whatsoever).
> As I remember the point is to use baselayer.clone() instead of baselayer and
> the scale of overview should be carefully set in the options (ovOptions in
> my example code). It is also possible to incorporate more than one layer in
> overview, but the first one need to be a baselayer.
>
> This is a piece of my code that works!
>
> var ovOptions = {
> maxExtent: new OpenLayers.Bounds(7380500,
> 4670500, 7670500, 4960500),
> units: 'm',
> projection: new
> OpenLayers.Projection("EPSG:31277"),
> scales: [1700000]
> };
> var overview = new OpenLayers.Control.OverviewMap({layers:
> [baselayer.clone(), layer_ovode, layer_ogradovi], mapOptions: ovOptions});
> map.addControl(overview);
> --
> View this message in context:
> http://n2.nabble.com/Is-it-possible-to-have-an-OverviewMap-for-a-vector-layer-tp4855411p4860757.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users