Aquire x/y coordinates from rectangle object
Lowell Filak
lfilak at MEDINACO.ORG
Tue Sep 7 08:48:46 PDT 2004
The following message was sent by Lowell Filak <lfilak at MEDINACO.ORG> on
Tue, 7 Sep 2004 10:37:36 -0400.
> The following message was sent by G-Net Consulting
> <joelf at GNETCONSULTING.COM> on Sat, 4 Sep 2004 01:14:23 -0400.
>
> > Hello List:
> >
> > I'm looking for a snippet of code to grab the X/Y coordinates
> > from a point in a shape file. I've pulled the shape data in
> > from the DBF (thanks to Lowell for that). Now I would like
> > to display the data in overLib with a mouseover.
> >
> > So what is the best way to get the X/Y for each shape
> > in the chosen extent?
> >
> > Thanks.
> >
> > Joel
>
> Joel;
>
> You can:
>
> shapeObj = new shapeObj(type_point)
>
> use the shapeindex from resultCacheMemberObj with
> layer->getShape(shapeObj, 0, shapeindex)
>
> pointObj=shapeObj->get(0)
>
> pointObj->{x} & pointObj->{y}
>
> The doc (at least swigmapscript) needs to be clearer on this.
>
> Lowell
Joel;
My bad.
To access the pointObj you will need to go through the shapefileObj.
I'll send an example shortly.
Lowell
More information about the MapServer-users
mailing list