Good morning,
I'm doing a bit of an experiment trying to get data stored in SQL Server to line up with the data displayed in an OpenStreetMap layer.
I have learned the hard way many months ago (and just duplicated it a few minutes ago) that if I don't specify the SRID on the MsSql2008 layer, the map doesn't show. If I do this:
MsSql2008FeatureLayer layer = new MsSql2008FeatureLayer(connString, "vwRoads_Freeway", "gid");
I get an empty map. (I could also believe the features are drawn, but not where I am looking based on the extent I'm setting for the map.) Currently, we have our SQL Server data in SRID 3395, and I must do this:
MsSql2008FeatureLayer layer = new MsSql2008FeatureLayer(connString, "vwRoads_Freeway", "gid", 3395);
...which works just fine. I've been told the SRID used by OpenStreetMap, GoogleMaps, etc. is 3785. HOWEVER, ManagedProj4 does not seem to know of this number; it returns an empty string, and if I use the value as th SRID in the MsSql2008FeatureLayer the data does not show. I presume that's using Proj4 as well and doesn't know the code 3785. I realize that through ManagedProj4 I can use GetGoogeMapParameterString, but that doesn't help since there is no MsSql2008FeatureLayer constructor that takes the parameter string.
So my question is this: if I create an MsSql2008FeatureLayer WITHOUT A PROJECTION IDENTIFIER (like the first example above) can I somewhere else (perhaps in the Projection property of the FeatureSource using a ManagedProj4?) create a projection using the parameter string for Google Maps I CAN get from ManagedProj4? Would I be creating a ManagedProj4 with the same "from" and "to" parameter strings? Or is there a better way to get the projection parameters into the layer? I already have an entire database of data in the 3785 projection, so I just need to know how to tell MsSql2008FeatureLayer what projection the data is in. Or so I presume.
Thanks,
Allen