Hi ,
when I build a Graphic with PictureMarkSymbol, the shape of Graphic is Rectangle, I want to make a Circle shape Graphic with PictureSymbol, Anyone who know how to do it ?
Hi Yan,
PictureMarkerSymbol has the height and width and doesn't have any Style propery like SimpleMarkerSymbol.In that case I believe you may create a CompositeSymbol using both SimpleMarkerSymbol with Style "Circle" and PIctureMarkerSymbol as below:
/////////
var symbol = new CompositeSymbol(); symbol.Symbols.Add(new SimpleMarkerSymbol() { Style = SimpleMarkerSymbolStyle.Circle, Color = Colors.Blue, Size = 100 }); var symbolUri = new Uri( "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Recreation/FeatureServer/0/images/e82f744ebb069bb35b234b3fea46deae");
PictureMarkerSymbol campsiteSymbol = new PictureMarkerSymbol(symbolUri);
campsiteSymbol.Height = 40; campsiteSymbol.Width = 40;
symbol.Symbols.Add(campsiteSymbol);
// Create location for the campsite MapPoint campsitePoint = new MapPoint(-223560, 6552021, SpatialReferences.WebMercator);
// Create graphic with the location and symbol // Graphic campsiteGraphic = new Graphic(campsitePoint, campsiteSymbol);
Graphic campsiteGraphic = new Graphic(campsitePoint, symbol);
////////
I have used "RendererPictureMarkers" sample to test. Hope that helps.
Nagma
You will need to create a PNG image with transparent pixels, so only the center parts are non-transparent. That way you can create any shape you'd like.
Thanks, Nagma
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.