[mapguide-users] insertion point

Willem Schwarte willem at giskit.nl
Thu Nov 9 05:01:22 EST 2006


Hi,

 

I still need some help here please... 

 

 

Here is an excerpt of my code to get the selected item on the map:

 

$queryOptions->SetFilter($selectionString);

$featureReader = $featureService->SelectFeatures($layerFeatureResource,
$layerClassName, $queryOptions);

 

$sel = "";

                                               

while ($featureReader->ReadNext())

{

            $bordnummer = $featureReader->GetString('TEXTSTRING');

            $coord = $featureReader->GetCoordinate()->GetX();

}

 

Now it errors on GetCoordinate. Do I need to use something else to get
the coordinates? I can't really find anything helpful in the devmanual.

 

Thx,

 

Willem

 

                                               

 

________________________________

Van: Willem Schwarte [mailto:willem at giskit.nl] 
Verzonden: woensdag 8 november 2006 16:49
Aan: users at mapguide.osgeo.org
Onderwerp: RE: [mapguide-users] insertion point

 

Ok great, as I said, I already can read the properties from the selected
object, just didn't know how to get the coordinates... thx

 

________________________________

Van: Knight, Gregory [mailto:Gregory.Knight.bra at cityofboston.gov] 
Verzonden: woensdag 8 november 2006 15:17
Aan: users at mapguide.osgeo.org
Onderwerp: RE: [mapguide-users] insertion point

 

To get feature properties from the active selection, you need to do a
few things.


First you need to retrieve the selection from the viewer.  Depending on
the viewer you are using, this can be retrieved directly from the server
from your development environment or from the viewer via javascript.  

 

Once you have the selection info, you will need to perform the basic MG
initialization, create resource and feature services, etc.  The next
step is to connect to your map resource using the feature reader and
selection info to read the feature properties that you need.  The X and
Y coordinates can be retrieved with GetCoordinate().GetX() and
GetCoordinate.GetY() respectively.

 

This is the basic idea anyways...


There are some good examples in the Dev Guide that illustrate this
process.  Check out Ch 3 - Working With Feature Data.


Cheers,


Greg

 

________________________________

From: Willem Schwarte [mailto:willem at giskit.nl] 
Sent: Wednesday, November 08, 2006 8:21 AM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] insertion point

 

Hi,

 

How can I get the X and Y values of the insertion point of an object
that is currently selected on the map. I can get the properties of the
object, but now I also need the insertion point x and y values.

 

thanks

________________________________



The substance of this message, including any attachments, may be
confidential, legally
privileged and/or exempt from disclosure pursuant to Massachusetts
law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and
delete the material from any computer.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20061109/4dcd2e5e/attachment.html


More information about the Mapguide-users mailing list