[OpenLayers-Users] Overview Map Question

Robert Buzink post at robertbuzink.nl
Mon Jan 8 19:43:12 EST 2007


As I said before, I had the same problem as you, Hans. I solved it by
replacing:

map.addControl(new OpenLayers.Control.OverviewMap());

with:

var ov = new OpenLayers.Layer.WMS( "OpenLayers WMS",
        "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
var options = {
      layers: [ov.clone()],
      minRatio: 8,
      maxRatio: 128
    };
map.addControl(new OpenLayers.Control.OverviewMap(options));

as Christian López Espínola suggested. I still don't understand why the
default doesn't work. Maybe this should be changed? Now it only works for
people who really understand what they are doing, and not for technical-lego
kids like me :-).

Thanks for the help!


On 1/8/07, Christian López Espínola <penyaskito at gmail.com> wrote:
>
> Maybe you are using the SAME layer in the map and in the overviewmap,
> and this make you have this headaches. Try adding the overview map a
> layer.clone().
>
> Hope this helps.
>
> On 1/5/07, Tim Schaub <noreply at geocartic.com> wrote:
> >
> >
> >
> >
> >
> >
> > If I switch the two layers and have my own wms layer as the base layer
> and
> > the above mentioned as overlay – the overlay map doesn't work anymore.
> >
> > Any help on that?
> >
> >
> >
> > -Hans
> >
> >  Can you post a concise example that shows the problem?  The overview
> map
> > should work as any other map - with multiple layers if that's what you
> want.
> >
> >
> >
> > Tim
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
> >
>
>
> --
> Regards,
>
> Christian López Espínola
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Robert Buzink, website ontwerp en ontwikkeling
Sint-Pietersaalststraat 123
9000 Gent
+32 (0)9 33 00 267
+32 (0)487 548 414
post at robertbuzink.nl
robertbuzink.nl/webdesign
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070109/8918f073/attachment.html


More information about the Users mailing list