[Geoprisma-dev] config.xml ideas : automatism

Alexandre Dube adube at mapgears.com
Thu Dec 17 11:19:45 EST 2009


Hey,

  I need opinions.

  Here's an example use case.  Currently, in the config.xml, when you 
want to add edition on a Resource (for example) you need to :

  - setup a DS with <fields>
  - setup an editfeature widget
  - setup an featurepanel widget
  - setup a layer node in the map object with needed options
  - be sure that you think to set a min/max Scale or Resolution so that 
your vector layer is not always visible
  - also set it in the tree
  - set some styling
  - etc.

  What really pisses me off is to have to think to all that.  For that, 
I'd propose to *automatize* as much stuff as possible.  The main 
downside : less customization possible.

  My first idea is to  automatize the layer creation.  No more <layer> 
node needed is my main objective.  The resources defined with their 
datastore have to be enough.  For that, a couple options / behavior 
would be needed :

  - Vector layers are *only* added if a widget use it.  No options.  
This is the only behavior.

  - By default, only one of these type of layer is added : tilecache or 
wms.  If set to false, all layer types are added.
      <singleLayer>true</singleLayer>
  - By default, tilecache is added first.
      <layerPriorities>
        <layer>tilecache</layer>
        <type>wms</type>
      </layerPriorities>
  - By default, wms layers are automatically merged if they share the 
same service, but you can turn that option off
      <mergeWMSLayers>true<mergeWMSLayers>

   (for the above options, no one needs to be defined.  They all have a 
'default' value.  If you want a different behavior, change it.)  All the 
above options are part of the <application> node.

  - Layers are automatically added to the layertree with a single option 
in the resource : <layerTreePath>/my/path/</layerTreePath>


  Again, the price to pay is : less customization, but more simplicity 
to use.

  That's the main thing I'm aiming and that's what I want you to tell me 
: does this makes sense ?

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Geoprisma-dev mailing list