RouteMAP IMS 3.0 .NET API

Projections

RouteMAP IMS 3.0 introduces the ability to change a map projection from within your code.

The setProjection method of the Map object changes the default map projection. All coordinates and extents will be returned and must be set in this projection. You can choose any projection from the Appendix G: Projections Strings in the WKT Format and then use the example code below to set a projection:


' VB.NET
map.setProjection( "PROJCS[""Lambert_Conformal_Conic"",GEOGCS[""Geographic""," & _
"DATUM[""D_WGS_1984"",SPHEROID[""WGS_1984"",6378137,298.257223563]]," & _
"PRIMEM[""Greenwich"",0],UNIT[""Degree"",0.0174532925199433]]," & _
"PROJECTION[""Lambert_Conformal_Conic""],PARAMETER[""Central_Meridian"",-115.1424]," & _
"PARAMETER[""Latitude_Of_Origin"",51.8116],PARAMETER[""Standard_Parallel_1"",74.4651]," & _
"PARAMETER[""Standard_Parallel_2"",29.1582],PARAMETER[""Scale_Factor"",1]," & _
"PARAMETER[""False_Easting"",0],PARAMETER[""False_Northing"",0]," & _
"UNIT[""Mile_US"",1609.34721869444]]")

or

// C# or JScript.NET

map.setProjection( "PROJCS[\"Lambert_Conformal_Conic\",GEOGCS[\"Geographic\"," +
"DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0]," +
"UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Lambert_Conformal_Conic\"]," +
"PARAMETER[\"Central_Meridian\",-115.1424],PARAMETER[\"Latitude_Of_Origin\",51.8116]," +
"PARAMETER[\"Standard_Parallel_1\",74.4651],PARAMETER[\"Standard_Parallel_2\",29.1582]," +
"PARAMETER[\"Scale_Factor\",1],PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0]," +
"UNIT[\"Mile_US\",1609.34721869444]]");

Also you can set a different projection for any specific zoom level. To set a projection you want, get the ZoomLevelsInfo object and then set a new projection using a string in the WKT format. For example:


' VB.NET
map.getZoomLevelsInfo().setLevelPrj( 0, "PROJCS[""Lambert_Conformal_Conic"",GEOGCS[""Geographic""," & _
"DATUM[""D_WGS_1984"",SPHEROID[""WGS_1984"",6378137,298.257223563]]," & _
"PRIMEM[""Greenwich"",0],UNIT[""Degree"",0.0174532925199433]]," & _
"PROJECTION[""Lambert_Conformal_Conic""],PARAMETER[""Central_Meridian"",-115.1424]," & _
"PARAMETER[""Latitude_Of_Origin"",51.8116],PARAMETER[""Standard_Parallel_1"",74.4651]," & _
"PARAMETER[""Standard_Parallel_2"",29.1582],PARAMETER[""Scale_Factor"",1]," & _
"PARAMETER[""False_Easting"",0],PARAMETER[""False_Northing"",0]," & _
"UNIT[""Mile_US"",1609.34721869444]]")

or

// C# or JScript.NET

map.getZoomLevelsInfo().setLevelPrj( 0, "PROJCS[\"Lambert_Conformal_Conic\",GEOGCS[\"Geographic\"," +
"DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0]," +
"UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Lambert_Conformal_Conic\"]," +
"PARAMETER[\"Central_Meridian\",-115.1424],PARAMETER[\"Latitude_Of_Origin\",51.8116]," +
"PARAMETER[\"Standard_Parallel_1\",74.4651],PARAMETER[\"Standard_Parallel_2\",29.1582]," +
"PARAMETER[\"Scale_Factor\",1],PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0]," +
"UNIT[\"Mile_US\",1609.34721869444]]");

For additional projection related methods see the Projection interface description. For additional zoom level related methods see the Map interface methods.


Albers Equal-Area Conic

Equidistant Cylindrical

Geographic

Hotine Oblique Mercator

Lambert Conformal Conic

Robinson