how to directly overlay sqlserver spatial data

1801
7
03-02-2012 01:52 AM
SolidSmoke
New Contributor
can anybody help me to show sqlserver spatial data without the help of any arcgis sde and all. I mean by using json or something alse
0 Kudos
7 Replies
NianweiLiu
Occasional Contributor II
There is an arcgis data server produce that does not require SDE. It serves SQL 2008 geometry directly.
If you do not mind writing code, check out the sql server 2008 add on package which include the .NET library for spatial type.
0 Kudos
SolidSmoke
New Contributor
I know how to bring sql spatial data as sqlgeometry type.....but my problem is how to show this on map using arcgis javascript api
0 Kudos
derekswingley1
Frequent Contributor
You need something server side to serve your data from MSSQL on the web. Ideally, this would be ArcGIS Server.
0 Kudos
MattMoyles
New Contributor III
You will first need to get the data into a web browser. You can write a simple .NET Webservice or PHP script that will server features. What you will want to do is to 'massage' the data returned by SQL into the ESRI Rest format. Check out the ESRI Rest Specification, if you can serve data in the same format you can feed it straight into a feature layer, using a feature collection or maybe straight from the url if you want to implement Query,Identify etc in your little map service.

ESRI Rest Spec. - http://www.esri.com/library/whitepapers/pdfs/geoservices-rest-spec.pdf
0 Kudos
SolidSmoke
New Contributor
thank you mmoyles......do you have any sample code for doing this
0 Kudos
nicogis
MVP Frequent Contributor
it isn't direct but you can easily add in mxd a query layer (see my video http://www.youtube.com/watch?v=JSDt0Mi5vHE )

you can see also this code (Morten Nielsen (ESRI)) shows how expose your SQL Server 2008 Geometries directly with ASP.NET as a FeatureService ready to use with any ArcGIS WebAPI Client FeatureLayer
http://www.arcgis.com/home/item.html?id=6d28a606369c43fd9a6f929541ae7c93
0 Kudos
SolidSmoke
New Contributor
oh ciava.....that was rocking.....u saved my balls man.....thanks a lot....and a big thanks to Morten Nielsen....he s the best....always....
0 Kudos