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. }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.