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/e82f744...");
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
Thanks, 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.