Index: Core/Common/src/Core.Common.Base/Geometry/Point3DCollectionExtensions.cs =================================================================== diff -u -r9b2bb9a809f4b42bd06b910dde1f6eb8e546356f -r521fd4ed7406936caea01ab793ae9dbfeec69cc5 --- Core/Common/src/Core.Common.Base/Geometry/Point3DCollectionExtensions.cs (.../Point3DCollectionExtensions.cs) (revision 9b2bb9a809f4b42bd06b910dde1f6eb8e546356f) +++ Core/Common/src/Core.Common.Base/Geometry/Point3DCollectionExtensions.cs (.../Point3DCollectionExtensions.cs) (revision 521fd4ed7406936caea01ab793ae9dbfeec69cc5) @@ -83,13 +83,11 @@ Point3D lastPoint = null; foreach (Point3D point in points) { - if (lastPoint != null) + if (lastPoint != null && !Equals(lastPoint, point)) { - if (!Equals(lastPoint, point)) - { - return false; - } + return false; } + lastPoint = point; } return true; Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs =================================================================== diff -u -rd15513df1bcbfee9f9edbe42da62e63c0b131574 -r521fd4ed7406936caea01ab793ae9dbfeec69cc5 --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision d15513df1bcbfee9f9edbe42da62e63c0b131574) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision 521fd4ed7406936caea01ab793ae9dbfeec69cc5) @@ -392,13 +392,10 @@ private void DrawInitialMapData() { - if (backgroundMapData != null && backgroundMapData.IsConfigured) + if (backgroundMapData != null && backgroundMapData.IsConfigured && InitializeBackgroundLayer()) { - if (InitializeBackgroundLayer()) - { - Projection = backgroundLayerStatus.BackgroundLayer.Projection; - map.Layers.Add(backgroundLayerStatus.BackgroundLayer); - } + Projection = backgroundLayerStatus.BackgroundLayer.Projection; + map.Layers.Add(backgroundLayerStatus.BackgroundLayer); } if (Data != null) Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs =================================================================== diff -u -r6b8f6422c0a6f96f8e563bb6afb82a7a192142b4 -r521fd4ed7406936caea01ab793ae9dbfeec69cc5 --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs (.../BruTileLayer.cs) (revision 6b8f6422c0a6f96f8e563bb6afb82a7a192142b4) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs (.../BruTileLayer.cs) (revision 521fd4ed7406936caea01ab793ae9dbfeec69cc5) @@ -344,16 +344,14 @@ private static ProjectionInfo GetTileSourceProjectionInfo(string spatialReferenceSystemString) { ProjectionInfo projectionInfo; - if (!TryParseProjectionEsri(spatialReferenceSystemString, out projectionInfo)) + if (!TryParseProjectionEsri(spatialReferenceSystemString, out projectionInfo) + && !TryParseProjectionProj4(spatialReferenceSystemString, out projectionInfo)) { - if (!TryParseProjectionProj4(spatialReferenceSystemString, out projectionInfo)) - { - // For WMTS, 'spatialReferenceSystemString' might be some crude value (urn-string): - string authorityCode = ToAuthorityCode(spatialReferenceSystemString); - projectionInfo = !string.IsNullOrWhiteSpace(authorityCode) - ? AuthorityCodeHandler.Instance[authorityCode] - : null; - } + // For WMTS, 'spatialReferenceSystemString' might be some crude value (urn-string): + string authorityCode = ToAuthorityCode(spatialReferenceSystemString); + projectionInfo = !string.IsNullOrWhiteSpace(authorityCode) + ? AuthorityCodeHandler.Instance[authorityCode] + : null; } if (projectionInfo == null) Index: Core/Components/src/Core.Components.DotSpatial/MapFunctions/MapFunctionSelectionZoom.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r521fd4ed7406936caea01ab793ae9dbfeec69cc5 --- Core/Components/src/Core.Components.DotSpatial/MapFunctions/MapFunctionSelectionZoom.cs (.../MapFunctionSelectionZoom.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.DotSpatial/MapFunctions/MapFunctionSelectionZoom.cs (.../MapFunctionSelectionZoom.cs) (revision 521fd4ed7406936caea01ab793ae9dbfeec69cc5) @@ -143,7 +143,7 @@ } isDragging = false; - if (handled == false) + if (!handled) { e.Map.MapFrame.ResetExtents(); } Index: Core/Components/src/Core.Components.DotSpatial/Projections/TileReprojector.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r521fd4ed7406936caea01ab793ae9dbfeec69cc5 --- Core/Components/src/Core.Components.DotSpatial/Projections/TileReprojector.cs (.../TileReprojector.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Core/Components/src/Core.Components.DotSpatial/Projections/TileReprojector.cs (.../TileReprojector.cs) (revision 521fd4ed7406936caea01ab793ae9dbfeec69cc5) @@ -122,6 +122,7 @@ targetTileColorAccess[ppair.Item2.X, ppair.Item2.Y] = c; } } + // Copy to output tile targetTileColorAccess.SetBufferToImageAtOriginalLocation(targetTile); @@ -176,13 +177,12 @@ { return false; } - if (sourcePixelLocation.X < area.Width) + + if (sourcePixelLocation.X < area.Width && sourcePixelLocation.Y < area.Height) { - if (sourcePixelLocation.Y < area.Height) - { - return true; - } + return true; } + return false; } }