summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2018-03-17 00:13:54 -0400
committerJulian Rex <julian.rex@mapbox.com>2018-05-17 17:16:19 -0400
commit1b1ca76070e92ec80d1017a054a6b857864d33b3 (patch)
tree3744f4d9d0cbb9738fe5e473eeda24ec802219d3
parent954c4a64d1e751077e7f3fc86720674d753810db (diff)
downloadqtlocation-mapboxgl-1b1ca76070e92ec80d1017a054a6b857864d33b3.tar.gz
Additional comments
-rw-r--r--platform/ios/test/MGLAnnotationViewTests.m20
1 files changed, 18 insertions, 2 deletions
diff --git a/platform/ios/test/MGLAnnotationViewTests.m b/platform/ios/test/MGLAnnotationViewTests.m
index 43bcf826c2..2aee9950be 100644
--- a/platform/ios/test/MGLAnnotationViewTests.m
+++ b/platform/ios/test/MGLAnnotationViewTests.m
@@ -248,8 +248,24 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu
TestParam params[] = {
// Lat Lon Valid
{ -91.0, 0.0, NO},
- { -90.0, 0.0, YES}, // THIS ONE CURRENTLY FAILS
- { 90.0, 0.0, YES},
+
+ // The follow coordinate fails, essentially because the following in projection.hpp
+ //
+ // util::LONGITUDE_MAX - util::RAD2DEG * std::log(std::tan(M_PI / 4 + latLng.latitude() * M_PI / util::DEGREES_MAX))
+ //
+ // boils down to ln(0)
+ //
+ // It makes sense that -90° latitude (south pole) should be invalid from a projection point
+ // of view, but in that case shouldn't +90° (north pole) also be invalid?
+ //
+ // In Obj-C code, perhaps we need to replace usage of CLLocationCoordinate2DIsValid for an
+ // MGL one...
+
+ { -90.0, 0.0, YES}, // South pole. Should this really be considered an invalid coordinate?
+
+ // The rest for completeness
+ { -89.0, 0.0, YES},
+ { 90.0, 0.0, YES}, // North pole. Similarly, should this one be considered invalid?
{ 91.0, 0.0, NO},
{ 0.0, -181.0, NO},