<DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt">Dear Mr or Mrs:<FONT color=navy><SPAN style="COLOR: navy"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></SPAN></FONT></div> <div class=MsoNormal><FONT face=Verdana color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></FONT></div> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"><BR> My name is Jihong, the GIS department of <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City w:st="on"><st1:place w:st="on">Tianjin</st1:place></st1:City> ,I use mapguide 7.0,Now I meet a question .I want to know the difference of MgCurveRing,MgCurveStringCollection,MgCurveRing.<BR>How do I use those function?<BR>When I draw a circle or Polygon in map, what should I do? <BR>for example ,where is wrong?<BR>
<BR> MgUserInformation cred = new MgUserInformation(sessionId); //????<BR> MgSiteConnection site = new MgSiteConnection(); //connect to the site and get a feature service and a resource service instances<BR> site.Open(cred);<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"> MgFeatureService featureSrvc = site.CreateService(MgServiceType.FeatureService) as MgFeatureService;<BR> MgResourceService resourceSrvc = site.CreateService(MgServiceType.ResourceService) as MgResourceService;<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE:
12pt"> MgResourceIdentifier layerDefId = new MgResourceIdentifier(layerDef);<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"> MgMap map = new MgMap();<BR> map.Open(resourceSrvc,mapName);<BR> MgLayerCollection layers = map.GetLayers();<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"> srs = GetMapSrs(map); //????<SPAN lang=ZH-CN>做什么用</SPAN><BR> MgLayer layer = FindLayer(layers,layerDef);<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"> MgGeometryFactory geomFactory =
new MgGeometryFactory();<BR> MgCoordinateCollection coordinates = new MgCoordinateCollection();<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"> String[] pArray = p.Split(',');<BR> coordinates.Add(geomFactory.CreateCoordinateXY(Double.Parse(pArray[0]), Double.Parse(pArray[1])));<BR> MgCurveString geom = geomFactory.CreateMultiCurveString(pArray); // what's wrong???<BR> <BR> MgPropertyCollection measureProps = new MgPropertyCollection();<BR> MgInt32Property partialProps = new MgInt32Property("TYPE",1);<BR> measureProps.Add(partialProps);<BR>
<BR> MgAgfReaderWriter agf = new MgAgfReaderWriter();<BR> MgByteReader geomReader = agf.Write(geom);<BR> MgGeometryProperty geometryProp = new MgGeometryProperty(geomProperty, geomReader);<BR> measureProps.Add(geometryProp);<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt"> MgInsertFeatures cmd = new MgInsertFeatures("Edit_layer_polyline",measureProps);<BR> MgFeatureCommandCollection commands = new MgFeatureCommandCollection();<BR> commands.Add(cmd);<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt">I'm looking forware to your quick reply,thank
you !!! if you reply ,Mailto:jihong3630@yahoo.com.cn<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt">Yours sincerely,<o:p></o:p></SPAN></FONT></div></DIV> <DIV> <div class=MsoNormal><FONT face=SimSun size=3><SPAN style="FONT-SIZE: 12pt">Jihong<o:p></o:p></SPAN></FONT></div></DIV><p> __________________________________________________<br>赶快注册雅虎超大容量免费邮箱?<br>http://cn.mail.yahoo.com