Reputation: 17915
I'm switching out of Bing Maps into ESRI but have hard time finding sample which will do the same thing..
I have layer on top of base map showing position of assets. Data bound via MVVM.
This is code from Bing Maps:
<m:MapItemsControl ItemsSource="{Binding Source={StaticResource WorkLayerData}}">
<m:MapItemsControl.ItemTemplate>
<DataTemplate>
<Canvas .. coordinate properties
.... STUFF drawn here.....
</Canvas>
</DataTemplate>
</m:MapItemsControl.ItemTemplate>
</m:MapItemsControl>
I figured that most close is ElementLayer in ESRI Silverlight control, but can't figure out how to bind it to my datasource and achieve similar result.
I can't even post what I've tried because all samples I found on ESRI website just do static elements, but I need to bind collection.
Any pointers?
Upvotes: 1
Views: 186
Reputation: 6415
You probably want to be using an Esri FeatureLayer
, which can connect to either a MapService (if you use an Esri map server) or a spatial data service.
Have you looked at the online samples here?
https://developers.arcgis.com/silverlight/sample-code/start.htm#FeatureLayerSimple
Upvotes: 1
Reputation: 1966
The SL SDK comes with a Bing Maps layer out of the box.
See the Bing Maps sample here: https://developers.arcgis.com/silverlight/sample-code/start.htm#BingImagery
Essentially it's:
<esri:Map>
<bing:TileLayer Token="INSERT_MY_BING_KEY_HERE" LayerStyle="Road" />
</esri:Map>
Upvotes: 1