void labeledPolygon(ESRI.ArcGIS.Client.Geometry.Polygon inPolygon) { Graphic polygonGraphic = new Graphic(); SimpleFillSymbol fillSymbol = new SimpleFillSymbol() { BorderBrush = borderBrush, Fill = fillBrush }; polygonGraphic.Symbol = fillSymbol; polygonGraphic.Geometry = inPolygon; Envelope extentEnvelope = inPolygon.Extent; MapPoint centerPoint = extentEnvelope.GetCenter(); Graphic textGraphic = new Graphic(); TextSymbol textSymbol = new TextSymbol() { //Text properties }; textGraphic.Symbol = textSymbol; textGraphic.Geometry = centerPoint; //Add the two graphics to the map. }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.