[Mapserver-users] help with ???->draw() mapscript function
Eric Bridger
eric at gomoos.org
Wed Aug 13 09:26:59 PDT 2003
If you use MapObj->prepareImage() you should not use MapObj->draw(). You
are responsible to do all the drawing using LayerObj->draw(), which
draws on the image prepared and Point->draw() or Rect->draw() etc. which
take both the prepared image and a layerObj. After you've finished all
your drawing you should call MapObj->drawLabelCache($img) to draw the
labels.
Typically I loop thru each layerObj, turning it on and calling
LayerObj->draw(). I make sure to skip any dynamic point layers.
Then I get the point layer obj and call Point->draw() for each point:
$point->draw($map, $layerObj, $img, undef, $text);
Finally I call $MapObj->drawLabelCache($img);
HTH
Eric
>
On Wed, 2003-08-13 at 19:17, Matt Doggett wrote:
> Can anyone help me out with the mapscript "draw" function?
>
> From what I see we've got a PointObj->draw(), LayerObj->draw(),
> MapObj->draw(), RectObj-draw(), etc. etc. So which one should I use?
> I'm using mapscript to dynamically create a layer containing point
> observations and I get different results depending on which object
> function I use.
>
> Matt
>
> Matt Doggett
> Spatial Climate Analysis Service
> Oregon State University
> 316 Strand Ag Hall
> Corvallis, OR 97331
> (541)737-9153
> mdoggett at coas.oregonstate.edu
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list