[mapguide-users] Another way to list selection

yof85 loref85 at yahoo.com.ar
Thu Mar 14 10:39:00 PDT 2013


Yes, I'm trying to zoom to a selected feature, I made a debug on my triple
loop and I didn't know the generated xml was exactly the same for all the
elements of a feature

I tried getting the centroid of the geometry and use the ZoomToView function
and it worked perfectly, thank you

this is basically what I did instead of creating the xml

MgAgfReaderWriter agfRW = new MgAgfReaderWriter();
MgByteReader geomReader = featureReader.GetGeometry(geomPropName);
MgGeometry geom = agfRW.Read(geomReader);
MgPoint point = geom.GetCentroid();

MgCoordinate coords = point.GetCoordinate();

sbres.Append(String.Format("	 {4}\n", (row % 2) == 0 ? "Search" :
"Search2", row, i, row, val, coords.GetX().ToString().Replace(",", "."),
coords.GetY().ToString().Replace(",", ".")));








--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Another-way-to-list-selection-tp5040201p5040447.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list