[mapserver-users] Position of label

Milo van der Linden mlinden at zeelandnet.nl
Tue Jan 26 09:11:07 EST 2010


If your AJAX webmap client of choice happens to be OpenLayers, there are 
better ways to do this.

Assuming you don't want the whole world labeled, you might consider 
using a WFS layer instead of a WMS layer. Then you can use OpenLayers to 
create *real* vector layers that can even have effects such as light up 
or resize *and* make the mouse cursor change when moving over a label or 
object. Plus it will give you the option to open up pop-up balloons, 
something you will hardly get done using a raster-layer only.

Otherwise, you are in there on your own. Your ajax script would need to 
translate real coordinates to pixel coordinates, guess label coordinates 
and stuff.. I would not go there if I where you.

"Don't invent wheels, ride great cars"

Kind regards,

Milo van der Linden

Jan Hartmann wrote:
> Hi folks,
>
> Is there a way to get back the exact position of the labels in a 
> MapServer map? I want to make the labels clickable with Ajax, so a x-y 
> values in image coordinates would be enough. I looked in the Template 
> and Mapscript docs, but couldn't find anything about the (computed) 
> position of labels.
>
> Jan
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the mapserver-users mailing list