Select to view content in your preferred language

can't access to pictureMarkerSymbol

711
2
02-07-2011 07:54 AM
BettyKeren
New Contributor
Hello,
I'm trying to get the ImageSource from the feature-symbol on the map in order to display it on other control.

I registered to the event: featureLayer_MouseLeftButtonUp
and tried to convert e.Graphic.Symbol to PictureMarkerSymbol,

the problem is that pictureMarkerSymbol was defined in the namespace:
ESRI.ArcGIS.Client.FeatureService.Symbols.PictureMarkerSymbol

and when I try to use it I get a compile error -"cannot access internal class PictureMarkerSymbol"

Is it possible to get the PictureMarkerSymbol object in other way?
or maybe i can get the feature symbol (the image) in different way?

Thanks!
Betty
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
The PictureMarkerSymbol created by the service is different from the PictureMarkerSymbol exposed in our API.

You can however, parse the Json string to get to the imageData and create a BitmapImage from this Source.
 byte[] contentInBytes = Convert.FromBase64String(imageData);
 BitmapImage bmi = new BitmapImage();
 bmi.SetSource(new MemoryStream(contentInBytes));


For example this service:http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0

If you append "?f=pjson" or "?f=json", you will see that each esriPMS has an imageData.
0 Kudos
MichaelFaulcon1
Deactivated User
The bitmaps created using this method have a black background that ArcMap will not allow me to make transparent.
Is there a way to utilize this image and still honor background transparency?
0 Kudos