From 2ff67872a25a5e1cfe684c50af476a13b4915c6d Mon Sep 17 00:00:00 2001 From: ClemensF Date: Wed, 29 Aug 2018 21:34:41 +0200 Subject: [PATCH] Version 4.10.0: Added MapProjections library project. --- MapProjections/Shared/GeoApiProjection.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MapProjections/Shared/GeoApiProjection.cs b/MapProjections/Shared/GeoApiProjection.cs index e06e92e7..80232f93 100644 --- a/MapProjections/Shared/GeoApiProjection.cs +++ b/MapProjections/Shared/GeoApiProjection.cs @@ -33,7 +33,7 @@ namespace MapControl.Projections get { return coordinateTransform; } set { - coordinateTransform = value; + coordinateTransform = value ?? throw new ArgumentNullException("The property value must not be null."); mathTransform = coordinateTransform.MathTransform; inverseTransform = mathTransform.Inverse(); @@ -67,7 +67,7 @@ namespace MapControl.Projections { if (mathTransform == null) { - throw new InvalidOperationException("The Wkt property is not set or not valid."); + throw new InvalidOperationException("The CoordinateTransformation property is not set."); } var xy = mathTransform.Transform(new double[] { location.Longitude, location.Latitude }); @@ -79,7 +79,7 @@ namespace MapControl.Projections { if (inverseTransform == null) { - throw new InvalidOperationException("The Wkt property is not set or not valid."); + throw new InvalidOperationException("The CoordinateTransformation property is not set."); } var lonLat = inverseTransform.Transform(new double[] { point.X, point.Y });