[Geoprisma-users] MeasureTool

Stephen Woodbridge woodbri at swoodbridge.com
Mon Dec 21 21:14:54 EST 2009


Alexandre Dube wrote:
> Steve,
> 
>  They're working on this demo : 
> http://dev4g.mapgears.com/geoprisma/demo/  Pick any user.
> 
>  I didn't check your config, but the MeasureTool widgets must be 
> manually added to the toolbar and they must by added to a resource too 
> (even thought it has nothing to do with the chosen resource).
> 
> Does the following config work for you ? (it's the one used in the demo)
> 
> <!-- WIDGETS -->
>        <geoexttoolbar>
>          <name>GeoExtToolbar</name>
>          <options>
>            <widgets>
>              <widget>MeasureToolLength</widget>
>              <widget>MeasureToolArea</widget>
>            </widgets>
>          </options>
>        </geoexttoolbar>
> 
>        <measuretool>
>            <name>MeasureToolLength</name>
>            <options>
>              <measuretype>Length</measuretype>
>            </options>
>        </measuretool>
> 
>        <measuretool>
>            <name>MeasureToolArea</name>
>            <options>
>              <measuretype>Area</measuretype>
>            </options>
>        </measuretool>
> 
> <!-- RESOURCES -->
>        <resource>
>            <name>R_GMAP_BASE</name>
>            <datastores>
>                <datastore>DS_WMS_DEV4G_GMAP_BASE</datastore>
>                <datastore>DS_TC_DEV4G_GMAP_BASE</datastore>
>            </datastores>
>            <widgets>
>                <widget>GeoExtToolbar</widget>
>                <widget>MeasureToolLength</widget>
>                <widget>MeasureToolArea</widget>
>            </widgets>
>        </resource>
> 

Ahh, I missed adding the RESOURCES. Now it works.

I also just noticed that there is a bug in the measure tool. It reports:

Area

256.31 km2
98.96 mi2

80.10 km
98.96 mi

I am assuming the the second set of numbers is the perimeter. As you can 
see the 98.86 mi2 ~= 251.31 * 0.62 * 0.62
the perimeter in mi should 80.10 km * 0.62 == 49.66 mi and not 98.96 mi 
which is the area value.

I'll write a bug on that also.

-Steve



> Regards,
> 
> Alexandre
> 
> Stephen Woodbridge wrote:
>> Does MeasureTool work?
>> Can someone add it to an existing or new sample?
>>
>> I tried to install it and on the good side I get no errors, on the 
>> other side I get no measure tools.
>>
>> Is graphicName option the path to an image for the toolbar? Or does 
>> the widget expect to find it as the basename for an image in the 
>> directory:
>>
>> .../widgets/geoexttoolbar/img/
>>
>> which does not currently have measure_length.png or measure_area.png 
>> that are in the /mapfish/client/mfbase/mapfish/img/ svn or some nicer 
>> ones the match the create, update, delete icons in GeoPrisma.
>>
>> -Steve
>> _______________________________________________
>> Geoprisma-users mailing list
>> Geoprisma-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geoprisma-users
> 
> 



More information about the Geoprisma-users mailing list