Hi,

Veldkamp, Berend wrote:
> How can I configure MB to have an overview map that shows the same
> layers as the main map? Right now, I can define /no/ layers, in which
> case the overview map shows the bottom-most layer of the main map, or
> I can define a /static/ set of layernames, but obviously these
> layernames can change when I load a different model with
> config.loadModel().

Try to work with a LocatorMap instead of the OverviewMap widget. Look at
OWSExplorer example to see how this works. It should be sufficient to
add the following to your context model:

      <widgets>
        <MapPaneOL id="locatorWidget">
          <htmlTagId>locatorMap</htmlTagId>
          <targetModel>mainMap</targetModel>
          <fixedSize>true</fixedSize>
          <imageBuffer>1</imageBuffer>
        </MapPaneOL>
        <AoiBoxDHTML id="aoiBoxLocator">
          <htmlTagId>locatorMap</htmlTagId>
          <lineColor>#FF0000</lineColor>
          <lineWidth>1</lineWidth>
          <crossSize>15</crossSize>
        </AoiBoxDHTML>
      </widgets>
      <tools>
        <AoiMouseHandler id="locatorAoi" />
        <ZoomToAoi id="locatorZoomToAoi">
          <targetModel>mainMap</targetModel>
        </ZoomToAoi>
      </tools>


As you can see, this is just another MapPaneOL connected to a context,
so this would be what you want. You just have to connect it to the same
context as your main map. This is an unusual use case, because it was
designed to have a separate context, but it should work.

Regards,
Andreas.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

Reply via email to