Round zoom level for Map Feedback tool

The Map Feedback tool is still using mapbox.js, so it doesn’t support fractional zoom levels yet.
This commit is contained in:
Minh Nguyễn
2015-05-10 23:34:47 -07:00
parent 7da7f65579
commit 965bc41d43

View File

@@ -1288,8 +1288,8 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
}
else if (buttonIndex == actionSheet.firstOtherButtonIndex + 2)
{
NSString *feedbackURL = [NSString stringWithFormat:@"https://www.mapbox.com/map-feedback/#/%.5f/%.5f/%.1f",
self.longitude, self.latitude, self.zoomLevel];
NSString *feedbackURL = [NSString stringWithFormat:@"https://www.mapbox.com/map-feedback/#/%.5f/%.5f/%i",
self.longitude, self.latitude, (int)round(self.zoomLevel)];
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:feedbackURL]];
}