[ios] Move private geometry symbol visibility definitions to header
This commit is contained in:
@@ -45,7 +45,6 @@ mbgl::LatLng MGLLatLngFromLocationCoordinate2D(CLLocationCoordinate2D coordinate
|
||||
}
|
||||
}
|
||||
|
||||
MGL_EXPORT
|
||||
CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLocationDegrees latitude, CGSize size) {
|
||||
CLLocationDistance metersPerPixel = mbgl::Projection::getMetersPerPixelAtLatitude(latitude, zoomLevel);
|
||||
CLLocationDistance metersTall = metersPerPixel * size.height;
|
||||
@@ -53,7 +52,6 @@ CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLo
|
||||
return altitude * std::sin(M_PI_2 - MGLRadiansFromDegrees(pitch)) / std::sin(M_PI_2);
|
||||
}
|
||||
|
||||
MGL_EXPORT
|
||||
double MGLZoomLevelForAltitude(CLLocationDistance altitude, CGFloat pitch, CLLocationDegrees latitude, CGSize size) {
|
||||
CLLocationDistance eyeAltitude = altitude / std::sin(M_PI_2 - MGLRadiansFromDegrees(pitch)) * std::sin(M_PI_2);
|
||||
CLLocationDistance metersTall = eyeAltitude * 2 * std::tan(MGLRadiansFromDegrees(MGLAngularFieldOfView) / 2.);
|
||||
|
||||
@@ -99,7 +99,7 @@ NS_INLINE mbgl::EdgeInsets MGLEdgeInsetsFromNSEdgeInsets(NSEdgeInsets insets) {
|
||||
@param latitude The latitude of the point at the center of the viewport.
|
||||
@param size The size of the viewport.
|
||||
@return An altitude measured in meters. */
|
||||
CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLocationDegrees latitude, CGSize size);
|
||||
MGL_EXPORT CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLocationDegrees latitude, CGSize size);
|
||||
|
||||
/** Converts a camera altitude to a map zoom level.
|
||||
|
||||
@@ -108,7 +108,7 @@ CLLocationDistance MGLAltitudeForZoomLevel(double zoomLevel, CGFloat pitch, CLLo
|
||||
@param latitude The latitude of the point at the center of the viewport.
|
||||
@param size The size of the viewport.
|
||||
@return A zero-based zoom level. */
|
||||
double MGLZoomLevelForAltitude(CLLocationDistance altitude, CGFloat pitch, CLLocationDegrees latitude, CGSize size);
|
||||
MGL_EXPORT double MGLZoomLevelForAltitude(CLLocationDistance altitude, CGFloat pitch, CLLocationDegrees latitude, CGSize size);
|
||||
|
||||
/** Returns MGLRadianCoordinate2D, converted from CLLocationCoordinate2D. */
|
||||
NS_INLINE MGLRadianCoordinate2D MGLRadianCoordinateFromLocationCoordinate(CLLocationCoordinate2D locationCoordinate) {
|
||||
|
||||
Reference in New Issue
Block a user