How to detect Coordinate system of my map

Topics: SharpMap v0.9 / v1.x
Sep 16, 2014 at 8:35 AM
I'm working with sharpmap and two map sources. SHP files and OpenStreetMap.
ShpFiles have WGS84 coordinate system and OpenStreetMap obviusly with WebMercator.

My control switches between one layer to other (when the user doesn't have internet connection will use shp files) The problem is that i want to show the latitude and longitude on mouse move.
I want decimal coordinates to be showed.

I have already show this info with shapefiles, I only have to use map.ImageToWorld with the mouse coordinates. The problem comes with the openstreepmap coordinate system, I'm able to convert between webmercator and WGS84 but but i want is to detect the map coordinate system to do the transformation in the cause we are using openstreetmap

Any ideas??
Editor
Sep 16, 2014 at 10:07 AM
if you are using OSM, then its projection is web mercator. So if you can convert between that and WGS84, then you already have the tools you need.
Sep 16, 2014 at 2:02 PM
Yeah i know it.
But I want to know if the map of Sharpmap have a variable that indicates the projection. In order to do or not do the transformation needed.
Editor
Sep 16, 2014 at 2:39 PM
you can set the SRID of a map and then query it to see what it is. This is an int that represents the SRID or EPSG code
Coordinator
Sep 16, 2014 at 6:09 PM
You can check var e = Map.GetExtents();. If -180 <= e.MinX && e.MaxX <= 180 and -90 <= e.MinX && e.MaxX <= 90 chances are you have a WGS84 coordinate system