ThinkGeo.com    |     Documentation    |     Premium Support

Google Map Overlay not lining up with Shapefile

I am using MapSuite 4.0. 


As per the attached screen capture, the shapefile is not lining up with the google map overlay.


I have followed the examples for projecting the shapefile.


This is the code I am using:


//Projection to go from Geodetic (Longitude/Latitude) to Google Map projection (Spherical Mercator).

//Geodetic projection (Longitude/Latitude).

proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);

proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString();



roadsLayer.FeatureSource.Projection = proj4;


Any suggestions on how to get the two layers to line up?


Thanks.


Elisa


 



current_app.jpg (95.7 KB)

Are you sure that your shapefile is really in EPSG 4326 projection (+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs)? Can you check the projection information with the shapefile, the PRJ file? It has to match this:  spatialreference.org/ref/epsg/4326/

 If you have no projection information. Make sure with your provider what exact projection your shapefile is in. Thank you.



Val:


I have located the projection information.  However, the code is not in any of the lookup files for MapSuite.  How do I add it in?


Code:  SR-ORG:6706         




<style type="text/css">
</style>North American 1983 (CSRS98) Canada

 

Well Known Text as HTML

GEOGCS["GCS_North_American_1983_CSRS",

    DATUM["D_North_American_1983_CSRS",

        SPHEROID["GRS_1980",6378137.0,298.257222101]],

    PRIMEM["Greenwich",0.0],

    UNIT["Degree",0.0174532925199433]]



Human Readable OGC WKT

GEOGCS["GCS_North_American_1983_CSRS",

    DATUM["D_North_American_1983_CSRS",

        SPHEROID["GRS_1980",6378137.0,298.257222101]],

    PRIMEM["Greenwich",0.0],

    UNIT["Degree",0.0174532925199433]]



Proj4

+proj=longlat +ellps=GRS80 +no_defs 



OGC WKT

GEOGCS["GCS_North_American_1983_CSRS",DATUM["D_North_American_1983_CSRS",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]



.prj file

GEOGCS["GCS_North_American_1983_CSRS",DATUM["D_North_American_1983_CSRS",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]]



ESRI WKT

GEOGCS["GCS_North_American_1983_CSRS",DATUM["D_North_American_1983_CSRS",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],



Proj4

+proj=longlat +ellps=GRS80 +no_defs 



OGC WKT

GEOGCS["GCS_North_American_1983_CSRS",DATUM["D_North_American_1983_CSRS",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

 


Thanks.


 


Elisa







<style type="text/css">
</style>




Please, refer to this post: gis.thinkgeo.com/Support/Discussion...fault.aspx