[mapguide-users] Re: Digitize Circle and get xml selection in Fusion

GordonL gordon.luckett at arrowgeomatics.com
Wed Oct 19 12:13:48 EDT 2011


Because the event is set up for RegularPolygon,
 if (this.handler.CLASS_NAME == 'OpenLayers.Handler.RegularPolygon') {
      var v = geom.getVertices();
      apiGeom = new Rectangle(new Point(v[0].x, v[0].y), new Point(v[2].x,
v[2].y));

You get the first and third vertices - which means very little to a 40 point
circle.

You may have to modify the handler to return the first and 20th coordinate
so you can get the Diameter and calculate the centroid

evt.feature.geometry.getBounds().getCenterLonLat(),



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Digitize-Circle-and-get-xml-selection-in-Fusion-tp6907577p6909339.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list