[fusion-users] Multiple Maps and OverviewMap.

Tómas Guðmundsson tomas at snertill.is
Mon May 19 12:19:18 EDT 2008


Mike,

Thanks for this. 

Currently I have 3 maps inside my AppDef. I have 3 Map widgets in the one WidgetSet, and I have 3 MapGroups in one MapSet. This works wonderfully but there are two problems. Perhaps qualify for a ticket? First off it selects the last Map in the Mapmenu as the default but not the first one. So Maps contains 3 maps and the last one is the one that the Map draws. Second, the overview map is not updated when I change maps. Is this already not implemented or do I need to add something more to the AppDef.xml ?

Thanks.
Tómas.

-----Original Message-----
From: Mike Adair [mailto:madair at dmsolutions.ca] 
Sent: 16. maí 2008 13:21
To: Tómas Guðmundsson
Cc: fusion-users at lists.osgeo.org
Subject: Re: [fusion-users] Multiple Maps and OverviewMap.

Tomas,

I've never tried putting 2 MapWidgets in one template before so there 
will likely be some issues around that, but Fusion is currently set up 
to have 1 MapWidget per WidgetSet.  So if you still want to try this, 
put the second MapWidget inside a second WidgetSet element in AppDef.

Putting more than one MapGroup element inside the MapSet has been tested 
and should work OK.  The Map to be shown by a MapWidget is selected by 
the ID attribute.

Putting more than one Map inside a MapGroup isn't supported yet, but it 
is being worked on and planned for the 1.1 release.

As for your OverviewMap questions, the MinRatio and MaxRatio options 
should be getting passed in to the control correctly (please file a 
ticket if they are not) but to be honest, I have a hard time figuring 
out how the OpenLayers control behaves too.  It may help to define a 
separate MapGroup for the overview (provide a <MapId> in it's extension) 
so that you can specify different minScale and maxScale values that are 
more appropriate for an overview map, rather than using a copy of the 
main map layer.

Hope that helps,

Mike



Tómas Guðmundsson wrote:
> Hi all.
>
> Happy Friday. Hope you have a wonderful weekend everyone. I have a couple questions for you all.
>
> First of regarding the maps. I thought originally that it would be enough to add these two things to the ApplicationDefinition.xml and life would be beautiful but I guess I'm not that lucky.
>
> 1. 
> <MapWidget xsi:type="WidgetType">
> <Name>Map</Name>
> <Type>Map</Type>
> <StatusText>The map.</StatusText>
> <MapId>sheboygan</MapId>
> <Extension xsi:type="CustomContentType">
> <MenuContainer>ContextMenu</MenuContainer>
> </Extension>
> </MapWidget>
>
> 2.
> <MapGroup id="sheboygan" xsi:type="MapType">
> <Map xsi:type="MapGuideLayerType">
> <Type>MapGuide</Type>
> <SingleTile>true</SingleTile>
> <Extension>
> <ResourceId>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</ResourceId>
> </Extension>
> </Map>
> </MapGroup>
>
> And with those two added to my AppDef I was hoping to have my main map and then the sample map as well so I could chose between in the <Widget>MapMenu</Widget> but nothing happens. I also get some errors that I think that are encountered with reading between the maps. Just to clear things, I added the MapGroup within the MapSet in the AppDef so I would have two MapGroups and two MapWidgets but I also tried to have two Maps within one MapGroup. Nothing worked. 
>
> My second question is regarding the OverviewMap. I played a little with the OverviewMap.js and the OverviewMap.xml to see if it would make any changes and nothing happen. Essentially I tried to change some variables like the min and max ratio, oLayerOL.ratio and numZoomLevels but what I'm trying to change in my overviewmap is when you zoom in, in the big map that the overview map doesn't change as well. So after I zoom in 3 times, the overview map starts to zoom in as well and at that time the red binding box in the overview map is so big that it's not feasible to pan around in the overview map. So how can I change the overview map so it that the overview map would never, or after 10 times zoom in. Note: Changing these lines (the value assigned) did not help.
>
>         if (this.mapObject.oLayerOL.singleTile) {
>           this.oMapOptions.numZoomLevels = 3;  //TODO: make this configurable?
>         }
>
> Also everyone. Have a great weekend. You know it's going to be fun!
>
> Regards,
> Tómas.
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>   


More information about the fusion-users mailing list