-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WmsLayer now also supports a few EPSG CRSs
- Loading branch information
Sören Kuklau
committed
Jul 15, 2020
1 parent
85e0876
commit 2d72688
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
namespace BlazorLeaflet.Models | ||
{ | ||
/// <summary> | ||
/// The Leaflet-supported _c_oordinate _r_eference _s_ystems. | ||
/// | ||
/// Used in WMS tile layers. | ||
/// </summary> | ||
public class Crs | ||
{ | ||
public string Code { get; } | ||
|
||
private Crs(string code) => Code = code; | ||
|
||
/// <summary> | ||
/// Rarely used by some commercial tile providers. Uses Elliptical | ||
/// Mercator projection. | ||
/// </summary> | ||
public static Crs Epsg3595 => new Crs("EPSG:3595"); | ||
|
||
/// <summary> | ||
/// The most common CRS for online maps, used by almost all free and | ||
/// commercial tile providers. Uses Spherical Mercator projection. Set | ||
/// in by default in Map's crs option. | ||
/// </summary> | ||
public static Crs Epsg3857 => new Crs("EPSG:3857"); | ||
|
||
/// <summary> | ||
/// A common CRS among GIS enthusiasts. Uses simple Equirectangular | ||
/// projection. Leaflet 1.0.x complies with the TMS coordinate scheme | ||
/// for EPSG:4326, which is a breaking change from 0.7.x behaviour. If | ||
/// you are using a TileLayer with this CRS, ensure that there are two | ||
/// 256x256 pixel tiles covering the whole earth at zoom level zero, and | ||
/// that the tile coordinate origin is (-180,+90), or (-180,-90) for | ||
/// TileLayers with the tms option set. | ||
/// </summary> | ||
public static Crs Epsg4326 => new Crs("EPSG:4326"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters