Creating Graphics from Table with XY

535
5
11-07-2011 05:29 AM
JayKappy
Occasional Contributor
Is there a way to interact with a stand alone table in SQL server if the table has an XY...
I am able to retrieve results in a simple datagrid/dataform in silverlight but want to add a graphic componemt...
What I want to do (dont know if its possible)

1. Is create graphics points from the XY fields in the table
2. Allow the user to select the graphic point and retrieve attribute information
3. eventually edit the values

This possible?  An examples out there?

THanks
0 Kudos
5 Replies
RobertBurke
Esri Contributor
Have you had a look at the samples to add graphics and work with Map Tips?

http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML

http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#GraphicsMapTip


Is your SQL Server database a geodatabase?
0 Kudos
JayKappy
Occasional Contributor
I will look at those links...I have done that before...but only with Data that was from a MapServive/Geodatabase

As to your second question...NO...this is a SQL Server table....its just information with an XY...I am populating the XY from another table....A standalone table with XY...NOT a geodatabase or data being pushed from a MapService...

possible?
0 Kudos
JenniferNery
Esri Regular Contributor
Sure you can use WCF Service to connect to your SQL Server. This might help:http://mscoder.wordpress.com/2010/07/11/datagrid-binding-and-crud-operations-in-silverlight-4-using-...

Once you can get the X,Y values, you can add it to your GraphicsLayer, just as in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphics.
0 Kudos
IgressT
New Contributor II
I had a similar requirement. However the size of the SQL server XY tabe was very huge and I had to retrieve all the points to show them on the map. Connecting with WCF and returning
all the data was not going to work because of the size o the data.

I ended up using Query Layer
0 Kudos
dotMorten_esri
Esri Notable Contributor
Also see this sample: http://www.arcgis.com/home/item.html?id=6d28a606369c43fd9a6f929541ae7c93
For large datasets, you are going to need to use paging though to iterate over multiple queries and incremently load the data. However I do believe that if you need to send that much data down to the client, you are doing it wrong 🙂 Try to be smart about what data you load, and keep as much as possible on the server until needed.
0 Kudos