[Mapserver-users] why can't I draw a point on my map?

Attila Csipa attila at prometheus.org.yu
Fri Feb 14 18:20:15 EST 2003


On Friday 14 February 2003 21:49, you wrote:
> up an early prototype, just trying to draw a one-layer map and then put
> a dot on it at a particular location.  I don't see the dot or its label.
>  Am I missing a step?  I wasn't sure whether the x & y coordinates

I had a similar problem and it turned out that the order of commands is 
relevant, even at places where it might seem it is not. So I would try 
something like:

> $map = ms_newMapObj($map_path.$map_file);
> $crab_layer = ms_newlayerObj($map);
> $crab_layer->set("status", MS_ON);
> $dot_class = ms_newClassObj($crab_layer);
> $dot_class->set("status", MS_ON);
> $image=$map->draw();
> $crab_here = ms_newpointobj();
> $crab_here->setXY(233, 340, 0);
> $crab_here->draw($map, $crab_layer, $image, 0, "");
> $image_url=$image->saveWebImage(MS_GIF,1,1,0);

Note that if you use a point and put text over right over it you might not 
see the point (maybe this was intended ?).


Regards,
Attila



More information about the mapserver-users mailing list