Hi all,
I use Mapserver 4 with php =
mapscript
Here’s the thing,
I am trying to draw newRectObj() on a =
map.
The size and position are generated from =
mysql
However I think I am missing =
something.
What am I doing wrong here. I have been struggling =
with this
for a few days now, help would be higly appreciated.
Thanks,
Bart
// the map
$wvimap =3D =
ms_newMapObj("rdm3.map");
$wvimap->selectOutputFormat('png24');=
$wviimg =3D $wvimap->draw();
$imageobject =3D $wviimg->saveImage(test); =
// get correct layer
$wvilayer =3D =
$wvimap->getLayerByName("$bleble");
//$layerhandle =3D $wvilayer->open('$shpFname',1); =
// Zoek in deze layer de eerste =
class
$classObj =3D =
$wvilayer->getClass(0);
echo "classobject =3D =
$classObj<br>\n";
$wvilayer->set("name", =
"$bleble");
$wvilayer->set (status,MS_ON);
$wvilayer->set =
(type,MS_POLYGON);
$wvilayer->set =
(classitem,$classObj);
$wvilayer->set =
(labelitem,"WVI");
$wvilayer->set =
(data,"$shpFname");
$wvilayer->draw($wvimap,$classObj);=
p>
// Declaration of the rectangle =
object
$rectangle =3D ms_newRectObj();
// Here I calculate the values of the rectangle =
$rectangle->set("minx",($hshift+($measure=
ments)*($rd_x)));
$rectangle->set("miny",(($vshift+($measur=
ements)*($rd_y))));
$rectangle->set("maxx",(($hshift+(($measu=
rements)*($rd_x)+($barwidth)))));
$rectangle->set("maxy",(($measurements)*(=
$rd_y)
+ =
(($maxbarheight/$maxvalue)*($measurements))+($barminheight)));
echo "minx =3D =
$rectangle->minx<BR>\n";
echo "miny =3D =
$rectangle->miny<BR>\n";
echo "maxx =3D =
$rectangle->maxx<BR>\n";
echo "maxy =3D =
$rectangle->maxy<BR>\n";
// the following draw Mapserver does not =
like…
I cannot find any good examples how the draw for this =
rectobject
should be used.
$rectangle->draw();
the mapfile layer I want to use for displaying the =
rectObJect
LAYER
NAME "Ce-141"
TYPE polygon
STATUS ON
CLASS
NAME =
"Ce-141"
COLOR 253 132 =
115
BACKGROUNDCOLOR 253 132 =
115
SYMBOL 'circle'
LABEL
TYPE =
TRUETYPE
ANTIALIAS =
FALSE
FONT =
arial
COLOR 0 0 =
0
BACKGROUNDCOLOR 254 =
254 254
SIZE =
6
# ANGLE =
45
POSITION =
uc
# buffer =
2
END
END
END
------=_NextPart_000_0030_01C340C0.EFFB53F0--
From jhart at frw.uva.nl Wed Jul 2 12:02:26 2003
From: jhart at frw.uva.nl (Jan Hartmann)
Date: Fri Feb 8 15:14:53 2008
Subject: [Mapserver-users] JavaScript security
In-Reply-To: