How to display a SQLSERVER spatial table without using a package

2437
3
03-14-2014 05:39 AM
Labels (1)
ChristopheHardy
New Contributor
Hello,

I need some tips for creating an embedded software disconnected with the WPF runtime.

My application uses a SQLSERVER database for its data and mapping:
Is it possible to open and display a spatial table from  SQLSERVER without using a Package (mpk or tpk)?

If  it's not possible with the WPF runtime, is it possible with the engine?

thanks for the tips!

Regards,
0 Kudos
3 Replies
BKuiper
Occasional Contributor III
Hi,

using the spatial data from your database, you can draw Graphics that you can add to your GraphicsLayer and display them on the map without using an MPK or TPK. Have a look at the example app that is provided with the SDK installation. It shows you how you can create Graphics.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Bjorn's correct, if you would like to do this programmatically at runtime you should look at the GraphicsSource sample (http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Using_GraphicsSource_Online/02q2...). Your class just needs to present an ObservableCollection of type Graphic which can act as the GraphicsSource property for a GraphicsLayer.

In this case you should ensure you have set the Map.UseAcceleratedDisplay property to true, use a Renderer to symbolize the features and try setting the GraphicsLayer RenderingMode property to Static (provides greatest performance for features which will not have frequent symbol/geometry updates).

Cheers

Mike
0 Kudos
ChristopheHardy
New Contributor
Hi

Thanks for the tips!

I'll try your method,

Regards
0 Kudos