Thanks Andreas,
This sort of code snippet is invaluable to me and anyone else who may need
it.
I have some questions below.

On 8/1/07, Andreas Hocevar < [EMAIL PROTECTED]> wrote:
>
> Al,
>
> On 8/1/07, Al Byers < [EMAIL PROTECTED]> wrote:
> > I have a case where I have several compatible, regional, road datasets
> for
> > one state and I would like to simplify my coding. Is this a place for
> > MergeModel or is there a better way to combine these datasets.
>
> MergeModel is definitely a way to go. The following config snippets
> should get you going:


What is the advantage of using MergeModel vs. loading my layers into the
mainPane owsContext ResourceList (which works. I can't get the  MergeModel
approach to work. I am tracing thru to see what is going on). Do you only
use MergeModel for doing WFS queries?

<Model id="model1">
>   <defaultModelUrl>model1.xml</defaultModelUrl>
> </Model>
> <Model id="model2">
>   <defaultModelUrl>model2.xml</defaultModelUrl>
> </Model>
> <MergeModel id="mergeModel">
>   <widgets>
>     <GmlRendererOL...
>     ...>
>   </widgets>
>   <merges>
>     <merge>model1</merge>
>     <merge>model2</merge>
>   </merges>
>   <idXPath>//gml:featureMember/*</idXPath>
>   <idAttribute>fid</idAttribute>


Are these two lines above required if I just want to display layers on the
map?

</MergeModel>


I am going to paste in my config file just in case it may help:

    <Model id="central">
      <defaultModelUrl>central.xml</defaultModelUrl>
    </Model>
    <MergeModel id="mergemodel">
      <widgets>
        <GmlRendererOL id="mergeGmlRenderer">
          <htmlTagId>mainMapPane</htmlTagId>
          <targetModel>mainMap</targetModel>
          <mapContainerId>mainMapContainer</mapContainerId>
          <lineColor>#FF0000</lineColor>
          <lineWidth>1</lineWidth>
          <pointDiameter>20</pointDiameter>
        </GmlRendererOL>
      </widgets>
      <merges>
        <merge>central</merge>
      </merges>
    </MergeModel>


The <merge> tags bring in your source models. the first will be
> rendered on top, the last on bottom (if you use GmlRenderer).
>
> <idXPath> is the xpath to your node that has the feature id
> <idAttribute> is the name of the feature id attribute
> These two are needed to add a sourceModel attribute to each feature in
> the same element that holds the feature id attribute.
>
> I hope this helps.
>
> Regards,
> Andreas.
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

Reply via email to