[Chameleon] ROIArea widget

Tony Baylis tony.baylis at resexmap.com.au
Mon Mar 30 16:35:33 EST 2009


Thanks Julien,

Next time I should trust my own instincts a little more...I kept looking 
at that updateArea function but figured Jacob knew what he was doing and 
I had not set the template up right.

Cheers again.
Tony

Tony Baylis
Spatial Information Specialist
Resource and Exploration Mapping
Suite 8, 290 Boundary St
Spring Hill QLD 4000
Ph    3832 1600
Fax   3832 1603
Mob   0419 759 131
Email tony.baylis at resexmap.com.au
www   resexmap.com.au	



Julien-Samuel Lacroix wrote:
> Hi,
>
> There's a small bug in the ROIArea widget. Go in the following file 
> around line 316:
> chameleon/htdocs/widgets/ROIArea/ROIArea.widget.php
>
> Add opening and closing parenthesis to updateArea there to have the 
> following line in the end:
>     goCWCROIManager.RegisterEvent(ROI_CHANGED, "updateArea()");
>
> Julien
>
> Tony Baylis wrote:
>> Hi all,
>>
>> I'm not sure where I've gone wrong but I cannot get the ROIArea 
>> widget to display the area of any of the ROI objects drawn.  Below is 
>> the relevant code.
>>
>> Cheers for your help,
>> Tony
>>
>>           <CWC2 TYPE="ROIManager"
>>                 MODE="ADD"
>>                 EDGECOLOR="CC0033"
>>                 EDGEWIDTH="2"
>>                 FILLCOLOR="FF6666"
>>                 FILLOPACITY="30"
>>                 FILLROI="TRUE"
>>                 ONROICHANGED="updateArea" />
>>                    <CWC2 TYPE="ROIManagerMode"
>>                 MODE="ADD"
>>                 IMAGETIP="Add mode"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_mode_add_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_mode_add_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_mode_add_3.png" />
>>                    </CWC2>
>>                    <br>
>>                    <CWC2 TYPE="ROIManagerMode"
>>                 MODE="REPLACE"
>>                 IMAGETIP="Replace mode"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_mode_replace_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_mode_replace_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_mode_replace_3.png" />
>>                    </CWC2>
>>                    <br>
>>                    <CWC2 TYPE="ROIRectangleTool"
>>                 IMAGETIP="Draw a rectangle on the map"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_rectangle_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_rectangle_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_rectangle_3.png" />
>>                   </CWC2>
>>                    <br>
>>                    <CWC2 TYPE="ROIPolygonTool"
>>                 NUMBEROFPOINTS="200"
>>                 POINTSPACING="5"
>>                 IMAGETIP="Draw a polygon on the map"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_polygon_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_polygon_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_polygon_3.png" />
>>                   </CWC2>
>>                    <br>
>>                    <CWC2 TYPE="ROICircleTool"
>>                 IMAGETIP="Draw a circle on the map"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_ellipse_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_ellipse_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_ellipse_3.png" />
>>                    <br>
>>                    <CWC2 TYPE="ROIRemoveLast"
>>                 IMAGETIP="Remove the added ROI object"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_undo_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_undo_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_undo_3.png" />
>>                    </CWC2>
>>                          <br>
>>                    <CWC2 TYPE="ROIRemoveAll"
>>                 IMAGETIP="Remove all ROI objects"
>>                 IMAGEWIDTH="24"
>>                 IMAGEHEIGHT="24">
>>                 <IMAGE STATE="normal"
>>                 IMAGE="buttons/button_roi_clear_1.png" />
>>                 <IMAGE STATE="hover"
>>                  IMAGE="buttons/button_roi_clear_2.png" />
>>                 <IMAGE STATE="selected"
>>                  IMAGE="buttons/button_roi_clear_3.png" />
>>                    </CWC2>
>>
>>           <CWC2 TYPE="ROIArea"
>>                 UNITS="KILOMETERS"
>>                 LABEL="Area (sq km):"
>>                 WIDGETCLASS="inputBox" />
>>
>


More information about the Chameleon mailing list