Hi, I am having trouble to put my shapefile layer over google map.
The map display the shape file correct when I only have shape file layer and set the map.CurrentExtent to the boundingbox of the shapefilelayer. However, I am having trouble to put shapefile over google map.
The projection function I use is:
-- begin code
Map1.MapUnit = GeographyUnit.Meter;
GoogleOverlay google = new GoogleOverlay("Google Map");
google.JavaScriptLibraryUri = new Uri(Config.Current.GoogleUri);
google.GoogleMapType = GoogleMapType.Normal;
StreetShapeLayer = GetStreetShapeLayer();
Proj4Projection proj4 = new Proj4Projection();
proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString();
StreetShapeLayer.FeatureSource.Projection = proj4;
LayerOverlay shapeOverlay = new LayerOverlay("Shape Overlay", false, TileType.SingleTile);
shapeOverlay.Layers.Add(StreetShapeLayer);
shapeOverlay.TransitionEffect = TransitionEffect.None;
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.DeepOcean);
Map1.CurrentExtent = new RectangleShape(Config.Current.minX, Config.Current.maxY, Config.Current.maxX, Config.Current.minY);
Map1.CustomOverlays.Add(google);
Map1.CustomOverlays.Add(shapeOverlay);
--end code
The map is Guam's map, I have tried different Srid, and different Get_ParametersString functions, none of them work, the map only show Guam Island on google map, none of the features in the shape file is shown. I guess it wasn't project correctly.
Below is the projection data in .prj file
PROJCS["Guam_Geodetic_Network_1993",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",100000.0],PARAMETER["False_Northing",200000.0],PARAMETER["Central_Meridian",144.75],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",13.5],UNIT["Meter",1.0]]
Help!