Hi Anakreon,

On 10/31/07, Anakreon Mentis <[EMAIL PROTECTED]> wrote:
> There are two problems.
> 1: The loading message is not displayed anymore.

The Loading2 widget is currently unavailable. We hope to have it back
for the final release. I take your feedback as a vote for raising the
priority of it. And again, to anyone who feels like  working on the
Loading2 widget: a patch would be highly appreachiated.

> 2:When the Measurement widget is enabled, I have an error with
> message:
> this.defaultModelUrl=widgetNode.selectSingleNode("mb:defaultModelUrl").firstChild.nodeValue;

Your configuration is incomplete. You have to add/change some properties:

>                 <Measurement id="mesure">
>                         <buttonBar>mainButtonBar</buttonBar>
>                         <targetModel>mainMap</targetModel>

change to             <targetContext>mainMap</targetContext>

add:                     <targetModel>measureTemplate</targetModel>

>                         <class>Button</class>
>                         <disabledSrc>/images/MeasureEnable.png</disabledSrc>
>                         <disabledSrc>/images/ MeasureDisable.png</disabledSrc>

add:
<featureXPath>/gml:featureMember/topp:bc_roads/topp:the_geom/gml:MultiLineString/gml:lineStringMember/gml:LineString/gml:coordinates</featureXpath>
<defaultModelUrl>data/measurement.xml</defaultModelUrl>
>                 </Measurement>

The file data/measurement.xml should contain the following:
<?xml version="1.0" encoding="UTF-8"?>
<gml:featureMember xmlns:topp="http://www.openplans.org/topp";
xmlns:gml="http://www.opengis.net/gml";>
  <topp:bc_roads fid="bc_roads.1">
    <topp:the_geom>
      <gml:MultiLineString srsName="EPSG:4326">
        <gml:lineStringMember>
          <gml:LineString>
            <gml:coordinates decimal="." cs="," ts=" "></gml:coordinates>
          </gml:LineString>
        </gml:lineStringMember>
      </gml:MultiLineString>
    </topp:the_geom>
    <topp:LENGTH>0</topp:LENGTH>
  </topp:bc_roads>
</gml:featureMember>

Finally, in the model section of your context, add the model for the
measureTemplate:
    <FeatureCollection id="measureTemplate">
      <widgets>
        <ShowDistance id='showDistance'>
          <stylesheet>../lib/widget/ShowDistance.xsl</stylesheet>
        </ShowDistance>
      </widgets>
    </FeatureCollection>

This should be all.

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