RouteMAP IMS 3.0 Java 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:


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 specific projection, get the ZoomLevelsInfo object and then set a new projection using a string in the WKT format. For example see below:


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