cannot render PictureMarkersymbol in Feature Layer

2190
4
Jump to solution
07-03-2013 11:52 PM
HumzaAkhtar
Occasional Contributor II
Hi,

How do you access picture marker symbols (like the one in the picture attached )in Feature Layers in order to render them on the map using C# and XAML

[ATTACH=CONFIG]25715[/ATTACH]


I have upgraded to ArcGIS 10.1 SDK from 2.4 but I still cannot access these symbols


Regards
Humza
0 Kudos
1 Solution

Accepted Solutions
MiriRevivo
Occasional Contributor
Yes, that is true, but you can take the whole PictureMarkerSymbol object from the Renderer of the FeatureLayer that you have, so you don't have to create it yourself.

Hope this helps,
Miri.

View solution in original post

0 Kudos
4 Replies
MiriRevivo
Occasional Contributor
Hi Humza,

I think this sample would be a good place to start working with feature layers and renderers in Runtime.
http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Rendering_FeatureLayer/02q200000...

Essentially, the renderer is usually defined in the xaml file and is given a key, which is later used when creating the feature layer in order to specify its renderer.
If you want to access an existing UV renderer of a feature layer, you access the Renderer property of the feature layer and assign a UniqueValueRenderer object with it, and then access its UniqueValueInfos collection, which is a collection of all the symbols the renderer contains.
You can read more here - http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html

Hope this helps,
Miri.
0 Kudos
HumzaAkhtar
Occasional Contributor II
Thanks a lot for your reply Miri 🙂
0 Kudos
HumzaAkhtar
Occasional Contributor II
I tried your solution but the problem is this

Picture Marker Symbols take 'source' as the image source meaning the url of the image as input in XAML. Now I have the images in the feature layer uploaded on my ArcGIS online server, therefore I cannot retrieve the image url from there for each symbol to put into picture marker symbol.
0 Kudos
MiriRevivo
Occasional Contributor
Yes, that is true, but you can take the whole PictureMarkerSymbol object from the Renderer of the FeatureLayer that you have, so you don't have to create it yourself.

Hope this helps,
Miri.
0 Kudos