- 3 minutes to read
Map projections define how the Earth’s surface is displayed on a 2D plane. To do this, a projection utilizes a sphere, an ellipsoid, a cylinder, or another 3D-shape as the Earth’s model. Then the projection uses formulas to map the shape’s surface onto the 2D plane. These conversions bring distortions in the Earth surface’s 2D representation. For example, the the Mercator projection distorts objects more if they are closer to the polar regions.
- An image tile provider‘s Projection property specifies the projection the provider uses to prepare map tiles. The Map Control shows the “The image tiles projection is not compatible with the map projection.” message instead of tiles when the control coordinate system’s projection differs from the image data provider’s projection. The built-in image tile data providers use the Spherical Mercator projection.
- The WMS image provider returns WMS layers that contain information about Coordinate Reference Systems (CRS) available for a layer. The Map Control adapts a map image that the provider’s active layer delivers if one of the layer’s CRSs is compatible with the control coordinate system’s projection; otherwise, the Map Control does not show the WMS layer’s content.
See the Map projection page for more information about map projections.
Built-in Map Projections
The following table contains the predefined projections that the Map Control for WinForms provides:
There are two ways to modify a map projection:
- Create a custom ProjectionBase class descendant that represents a custom map projection (see the How to: Implement a Custom Map Projection example).
Configure the Width to Height Ratio for the one of the predefined map projections. Perform the following steps to do this:
- Create one of the projections listed above (for example, the EqualAreaProjection object).
- Specify the Width to Height Ratio for the projection via the MapControl.InitialMapSize property.
- Assign the projection to the MapControl.CoordinateSystem‘s Projection property;
For instance, you can find Width to Height Ratios for the cylindrical equal-area projection on the Cylindrical equal-area projection page.
The table below lists the cylindrical equal-area projections with different Width to Height Ratios:
Projection Name (Width/Height Ratio) Projection Preview Lambert (3.14) Behrmann (2.36) Trystan Edwards (2) Gall-Peters (1.57) Balthasart (1.3)
Refer to the How to: Provide Cylindrical Equal-Area Projections topic to see a code snippet that specifies ratios for the cylindrical equal-area projection.
The following examples demonstrate how to use predefined projections, create custom map projections and customize a projection’s width/height ratio:
- How to: Specify a Map Projection
- How to: Implement a Custom Map Projection
- How to: Provide Cylindrical Equal-Area Projections