====== Map Suite WebAPI Projection ====== ===== Video Overview ===== {{youtube>dAeNCJa-Y5A?large |Web API Projection Learning Sample}}
{{filehistory:WebAPIEditionSample_Projection_CS_151202.zip|C# Project}} [[source_code_webapieditionsample_projection.zip|View Source]] [[http://samples.thinkgeo.com/WebApiEdition/SampleTemplates/Projection/leaflet/|Try It Online(Leaflet)]] [[http://samples.thinkgeo.com/WebApiEdition/SampleTemplates/Projection/openlayers/|Try It Online(Openlayers)]]
==== Overview ==== Map Projection is a method of representing a spherical body (such as the Earth) on a two-dimensional surface (such as a computer screen). There are many different projections available, each of which represents the spherical curves of Earth in different ways. Because every projection distorts the data in some areas to a certain degree, choosing the right projection for the maps you want to view is important. For example, if you will be creating maps of a very specific local region of the United States, you might want to use a State Plane projection which focuses on that region. This will minimize distortion of the region you're working in at the expense of distorting other areas of the world. Because you will not need to display those other areas of the world, the distortion there is acceptable. For more information about the concept of projecting map data, we recommend [[http://en.wikipedia.org/wiki/Map_projection|this Wikipedia article]]. Map Suite support multiple projections and this sample shows some of the more commonly used projections. ==== Web Mercator Projection====
{{webapiedition:meterprojection_desktop.png?300}} \\ //EPSG3857//
In this sample the map uses Web Mercator Projection (EPSG3857). There are two layers, ThinkGeo's [[map_suite_world_map_kit_online|WorldMapKit.]] as basemap rendered client-side and a countries layer rendered server-side.
==== Decimal Degrees Projection ====
{{webapiedition:decimaldegreeprojection_desktop.png?300}} \\ //EPSG4326.//
This sample uses Decimal Degrees (EPSG4326) for its projection. There are two layers, ThinkGeo's [[map_suite_world_map_kit_online|WorldMapKit.]] as basemap rendered client-side and a countries layer rendered server-side.
==== Rotation Projection ====
{{webapiedition:rotationprojection_desktop.png?300}} \\ //Rotation Projection.//
This sample uses Web Mercator (EPSG3857) and we render all the countries, US highways and major cities with the custom overlay from the server-side. On the server-side we use rotation projection with given angle and pivot center. You can change the angle via the button on the upper right corner and when moving the map the pivot center will automatically change.
==== Custom Projection ====
{{webapiedition:customprojection_desktop.png?300}} \\ //Custom Projection: EPSG2163.//
This sample uses US National Atlas Equal Area (EPSG2163) and overlay all the countries with the custom projection rendering server-side.