Hi,
I am evaluating Map Suite Desktop (WinForms) as a replacement for ESRI's MapObjects. I went through the getting started tutorial and looked at the sample code for re-projecting data on the fly so that layers in differenct coordinate systems will line up properly.
The sample I was working with loaded sample data (World and World Capitals) provided with the evaluation download, which is aparently in WGS84 (EPSG 4326). In my experimenting I added a layer from SQL Server 2008 in NAD 83 Zone 16 (EPSG 26916). I used the Proj4Projection object and the layer I added worked perfectly.
However, I then tried to add a shape file in NAD27 (EPSG 4267). The code I used appears below. When the Proj4Projection object is applied to this layer it does not appear. I can get the layer to appear without trying to re-project it, but it doesn't quite line up with the other data. Any suggestions?
Thanks,
Steve
Dim oProj2 As New Proj4Projection(4267, 4326)
Dim oCountiesShp As New ShapeFileFeatureLayer("C:\Program Files\ESRI\MapObjects2\Samples\Data\USA\Counties.shp")
oCountiesShp.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.SimpleColors.Yellow, 2)
oCountiesShp.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
oCountiesShp.FeatureSource.Projection = oProj2
ShapeFileFeatureLayer.BuildIndexFile("C:\Program Files\ESRI\MapObjects2\Samples\Data\USA\Counties.shp", BuildIndexMode.DoNotRebuild)