Aquire x/y coordinates from rectangle object

G-Net Consulting joelf at GNETCONSULTING.COM
Tue Sep 7 10:43:03 EDT 2004


Lowell:

Thanks for the reply.

I actually got it working another way.  I pulled the lat/long vars from
the DBF and displayed them that way, after I found a snippet in the
old mailing list archives.  But I think I'll try it this way, too, as it
seems more elegant.

Thanks again for the help.

Joel

----- Original Message -----
From: "Lowell Filak" <lfilak at medinaco.org>
To: "G-Net Consulting" <joelf at GNETCONSULTING.COM>;
<MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Tuesday, September 07, 2004 10:37 AM
Subject: Re: [UMN_MAPSERVER-USERS] Aquire x/y coordinates from rectangle
object


> 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
>



More information about the mapserver-users mailing list