Bug 803 - [Chameleon-Widget]Use of RoiFeatureTool widget is not working as expected
: [Chameleon-Widget]Use of RoiFeatureTool widget is not working as expected
Status: RESOLVED FIXED
: Chameleon
Widget
: 1.99
: PC Linux
: P2 normal
: 1.99 beta 4
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-10-29 15:58 by
Modified: 2004-12-02 21:27 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-10-29 15:58:34
Use of this widget generates PHP errors and broken image.

Steps to reproduce:

1.  Load " sample_roi.phtml" application
2.  Click on "Define an ROI by selecting an existing feature"
3.  Select a polygon on the "WorldGen_Outline" layer.
4.  PHP errors appear and a broken image in the map preview.

p.s.:  I changed the layer name from "land_fn" to "WorldGen_Outline" in
"tools_roi.html"


Fedora Core 2
Mozilla 1.6
Chameleon 20041022


------------
Broken image location:

http://127.0.0.1/nsavard/chameleon_beta//widgets/ROIManager/ROIRenderer.php?
sid=41829f059407d&blah=0.8508692793317439&width=500&height=250&type=feature&
mode=1&coords=-5.759999999999991,35.28&edgecolor=0000FF&
edgewidth=2&fillcolor=0000FF&fillopacity=25&selectedLayer=l0:WorldGen

--------------
Text appearing in the page pointed out by the broken image:

Notice: Use of undefined constant MS_PIXEL - assumed 'MS_PIXEL' in
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php on
line 269

Notice: Undefined variable: bPoly in
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php on
line 311

Warning: Cannot modify header information - headers already sent by (output
started at
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php:269)
in /home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php
on line 141
�PNG  IHDR�
----------------
PHP warnings:

[29-Oct-2004 15:44:52] PHP Notice:  Use of undefined constant MS_PIXEL - assumed
'MS_PIXEL' in
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php on
line 269
[29-Oct-2004 15:44:52] PHP Notice:  Undefined variable:  bPoly in
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php on
line 311
[29-Oct-2004 15:44:52] PHP Warning:  Cannot modify header information - headers
already sent by (output started at
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php:269)
in /home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php
on line 141
[29-Oct-2004 15:44:52] PHP Notice:  Use of undefined constant MS_PIXEL - assumed
'MS_PIXEL' in
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php on
line 269
[29-Oct-2004 15:44:52] PHP Notice:  Undefined variable:  bPoly in
/home/nsavard/proj/chameleon_beta/htdocs/widgets/ROIManager/ROIRenderer.php on
line 311
------- Comment #1 From 2004-10-29 21:29:37 -------
Changed target to 1.99 RC 1.
------- Comment #2 From 2004-11-01 20:19:14 -------
it appears to be a typo in the code, in that the constant should be MS_PIXELS. 
I wonder if this was a change from a previous version of mapserver (Daniel, has
this changed?)

If not changed, then I will change MS_PIXEL to MS_PIXELS.  If it has changed
then I will implement something like:

if (!defined( "MS_PIXEL" ) && defined( "MS_PIXELS" ))
  define( "MS_PIXEL", MS_PIXELS );

but we'll need a fallback if neither is defined ... which would probably mean
that mapscript didn't load correctly ...
------- Comment #3 From 2004-11-08 15:53:23 -------
I went back to version 3.6, and the constant has always been called MS_PIXELS in
PHP MapScript.
------- Comment #4 From 2004-11-09 21:33:52 -------
fixed in cvs by changing MS_PIXEL to MS_PIXELS.