[Geoprisma-dev] Proposed change in workspaces

Yves Moisan yves.moisan at boreal-is.com
Thu Nov 26 10:57:45 EST 2009


Le jeudi 26 novembre 2009 à 09:13 -0500, Alexandre Dube a écrit :
> Yves,
> 
>   How about :
> 
> <workspace>
>    <name>MyWorkspace_3</name>
>    <layout>MyLayout_1</layout>
>    <maps>
>      <map>
>        <name>MyMapWidget_1</name>
>        <options></options>
>        <resources>
>           <resource>
>               <name>R_MY_RESOURCE</name>
>                  <widgets>
>                      <widget>MyMapFishLayerTreeWidget</widget>
>                      <widget>MyGeoExtToolbarWidget</widget>
> 
> 
> 
> A workspace always has one layout, but could have many maps.  Each map 
> is refered to the "map" widget, it options could be redefined in 
> <options>.  To it is attached all the resources we want with all their 
> widgets, including the MapFishLayerTree (that is a widget also anyway so 
> it doesn't need to be treated differently).
> 
> The <map> node is our 'core' node in this structure.  That's already the 
> case in all printWidgetExecution xsl:templates, where we use <pMapName> 
> everywhere to get the map object linked to the widget.

I revisited things this morning and here's the new proposed structure :

 <workspace>
   <name>workspace3</name>
   <layout>workspacelayout</layout>
   <map>DefaultMap3</map>
   <resources>

When I first tried it I thought I needed to have a 1 to 1 correspondence
between a map and a mapfishlayertree.  That is not the case, so now the
scenario is that one can define as many map objects as one wants in the
widgets section, but only one can be used in a workspace.  I don't think
it makes sense to be able to use many maps in a workspace.  Maybe at one
stage we could think of being able to override some map options (e.g.
for a maxextent or restrictedextent, which is a very common tweak asked
by users) in a workspace like you mention, but I think it's better to
use a different map object to tweak map options for now.  

Also, the mapfishlayertree need not be specified as a widget to include
in a workspace.  That makes it a "special" widget.  It may be a bit
surprising for users if the layertree is not configured to have all of
the layers contained in the map objects of a given configuration file
(e.g. a layer appears that you can't tick off) but I can document that.

If that is fine with folks, I would push the changes in svn.  Pascal
added a few lines in the XMLWorkspaceConfig.php file (to make a special
case with the map object).  I modified one of the workspace samples and
added a new ExtJS theme for tests.  I will also modifiy the docs.

Yves

> What do you think ?
> 
> Alexandre





More information about the Geoprisma-dev mailing list