summaryrefslogtreecommitdiff
path: root/platform
Commit message (Collapse)AuthorAgeFilesLines
* Fit to coordinatesMinh Nguyễn2015-06-261-1/+21
| | | | Whoever determined the boundaries of the District of Columbia did not have fit-to-bounds implementations in mind. With this change, shapes that are not unrotated rectangles fit much, much better.
* Avoid removing content size constraintsMinh Nguyễn2015-06-261-20/+71
| | | | | | Also, on iOS 8.0+, use `+[NSLayoutConstraint activateConstraints:]` and `+deactivateConstraints:` to efficiently prevent redundant constraints from lingering. Fixes #1779.
* Don't send MapChangeRegionIsChanging on every renderJohn Firebaugh2015-06-261-3/+0
|
* Remove duration argument from View::notifyMapChangeJohn Firebaugh2015-06-261-16/+3
| | | | Fixes #1026
* drive map rendering from main threadKonstantin Käfer2015-06-263-5/+22
|
* Implemented -setVisibleCoordinateBounds:Minh Nguyễn2015-06-251-0/+7
| | | Followup to #1783: Implemented the non-animated version of fit to bounds and makes it a KVO-compliant property.
* Test fit to bounds; added MGLCoordinateBounds functionsMinh Nguyễn2015-06-252-1/+4
| | | | Added a bunch of functions to work with MGLCoordinateBounds in a separate header analogous to MKGeometry.h. Added resolution-independent tests for common fit to bounds scenarios.
* Fit to bounds with paddingMinh Nguyễn2015-06-251-1/+7
| | | | Each side of the bounding box is specified independently, allowing more flexibility than the offset + padding construct supported in mapbox/mapbox-gl-js’ Camera.
* Reimplemented fit to boundsMinh Nguyễn2015-06-251-11/+23
| | | | The new implementation is now public and takes advantage of MGLCoordinateBounds. It is re-ported from `Camera.prototype.fitBounds()` in mapbox/mapbox-gl-js to ensure correct behavior. A new function, MGLCoordinateBoundsMake(), makes it easier to create an MGLCoordinateBounds for use with this method.
* Remove redundant didChangeAuthorizationStatus: in favor of didFailWithError:Jason Wray2015-06-251-9/+0
| | | | Listening to both `locationManager:didChangeAuthorizationStatus:` and `locationManager:didFailWithError:` delegate methods is unnecessary. Setting `showsUserLocation = NO` in the first means that the second never gets called and our `mapView:didFailToLocateUserWithError:` delegate method never gets called.
* Fix typo which caused MGLMultiPoint to return longitude as latitude of bounds.Brent Whitman2015-06-251-1/+1
|
* Reversed direction to be clockwiseMinh Nguyễn2015-06-251-2/+2
| | | | | | For consistency with MapKit, the Google Maps SDK, and these methods’ own documentation. Fixes #1780.
* Introduce the ThreadContextThiago Marcos P. Santos2015-06-251-1/+1
| | | | | | | | | mbgl::Thread will keep a ThreadContext for each running instance in a thread_local so we don't need to lookup a man in the Environment every time we need some info about the current thread. This patch is moving the ::currentlyOn check used on Debug build from the Environment class to the ThreadContext.
* Replaced user-facing assertions with exceptionsMinh Nguyễn2015-06-183-9/+34
| | | | Errors caused by client code should be communicated through NSExceptions. NSAsserts are intended for internal usage; because they include helpful information like the absolute path to the file containing the assertion, stripping the build (#1650) also strips assertion messages. Also replaced hardcoded references to methods in these messages with __PRETTY_FUNCTION__, which avoids future copy-pasta and handles cases in which the MGL class has been subclassed.
* Support shape annotations on GLFWViewThiago Marcos P. Santos2015-06-181-7/+66
| | | | | | Add different random triangles count by using the keys 7, 8, 9 or 0. Q will clear all the annotations. W will remove one annotation.
* Avoid null-change KVO notificationsMinh Nguyễn2015-06-172-2/+7
| | | | If no access token is set in the Info.plist, avoid triggering a KVO notification about the access token changing. By the same token (heh), avoid pulling a C string out of the change dictionary if the access token is being nilled out.
* Lightweight genericsMinh Nguyễn2015-06-174-36/+41
| | | | | | Added lightweight generics annotations to collection-typed method and protocol signatures to streamline usage of these members in Swift. Lightweight generic type specifiers are wrapped in conditionally-compiled macros for compatibility with Xcode 6.x. Manually preprocess the NS_*_OF() macros in a temporary copy of each header before appledoc sees the headers. Also removed the --ignore flag because we no longer have a private headers folder under include/mbgl/ios/.
* Defer to MGLMultiPoint for overlayBounds implementationMinh Nguyễn2015-06-162-2/+2
| | | | Fixes #1730.
* squash of #1655: shape annotations support for core & iOSJustin R. Miller2015-06-157-20/+280
|
* Revert "use array of structs rather than parallel arrays for annotations"Minh Nguyễn2015-06-152-9/+14
| | | | This reverts commit 2435c1ad2603432186ee61eb4c423244a088bc51 (#1710), which needs to be revisited in light of #1655, which is a much higher priority at the moment.
* Namespaced reachability notification constantMinh Nguyễn2015-06-122-3/+3
| | | Fixes #1717.
* use array of structs rather than parallel arrays for annotationsKonstantin Käfer2015-06-112-14/+9
|
* Audited headers for nullabilityMinh Nguyễn2015-06-1112-36/+83
| | | | | | | | Added some nullability qualifiers in method implementation selectors for consistency with declarations. The user dot view now has a non-zero size. Previously only its layer was sized properly. Also resolved some pedantic warnings about missing designated initializer overrides. Xcode 6.3 or above is now required for building this project.
* press 1 through 6 to add 10^(n-1) points in the current viewportKonstantin Käfer2015-06-091-2/+35
| | | | (only works correctly when rotated to north, but this is a just a debug functionality anyway)
* Merge remote-tracking branch 'origin/master' into HEADAnsis Brammanis2015-06-032-3/+29
|\ | | | | | | | | Conflicts: src/mbgl/renderer/painter_fill.cpp
| * #1659 - Converting true to YES, false to NO to match Objective C standardsBrad Leege2015-06-011-4/+4
| |
| * #1659 - Converting usingTestServer to atomic propertyBrad Leege2015-06-011-3/+6
| |
| * #1659 - Adding tile stream certificate and ssl pin check for test server.Brad Leege2015-05-282-0/+23
| |
* | Merge remote-tracking branch 'origin/master' into new-labellingAnsis Brammanis2015-05-2815-418/+403
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mbgl/map/source.cpp src/mbgl/map/source.hpp src/mbgl/map/tile_data.cpp src/mbgl/map/tile_parser.cpp src/mbgl/map/vector_tile_data.cpp src/mbgl/renderer/painter.cpp src/mbgl/renderer/symbol_bucket.cpp src/mbgl/text/glyph.hpp src/mbgl/text/glyph_store.cpp src/mbgl/text/placement.cpp test/suite
| * Defailablize init methodsMinh Nguyễn2015-05-271-28/+11
| | | | | | | | If an OpenGL context couldn’t be created, there’s just no point to soldiering on. Things are going to fall apart pretty quickly anyways. Assert and be done with it.
| * Return nil upon failure to initializeMinh Nguyễn2015-05-271-1/+2
| |
| * #1641 - Changing version to a static constant instead of a propertyBrad Leege2015-05-261-4/+3
| |
| * #1641 - Adding version and instance to Turnstile event and keeping them DRY ↵Brad Leege2015-05-261-7/+11
| | | | | | | | for general events processing
| * Replace mbgl::util::make_unique<> with std::make_unique<>Konstantin Käfer2015-05-269-37/+31
| |
| * DefaultFileSource has responsibility for handling mapbox:// URLsJohn Firebaugh2015-05-261-1/+1
| |
| * prefix Reachability with "MGL" to avoid linking conflicts and app store ↵Konstantin Käfer2015-05-262-7/+7
| | | | | | | | rejections
| * update Reachability with latest versionKonstantin Käfer2015-05-261-143/+85
| |
| * Merge pull request #1618 from mapbox/1ec5-utilityMinh Nguyễn2015-05-221-34/+34
| |\ | | | | | | Pull self-less utility methods out of MGLMapView into functions
| | * Pulled self-less utility methods out into functionsMinh Nguyễn2015-05-211-34/+34
| | | | | | | | | | | | Also include the name of the requested resource when asserting because one can’t be found.
| * | Merge pull request #1561 from 1ec5-style-id-1500Minh Nguyễn2015-05-211-12/+16
| |\ \ | | |/ | |/| | | | mapID → styleID
| | * mapID → styleIDMinh Nguyễn2015-05-141-11/+15
| | | | | | | | | | | | | | | | | | Deprecated `-mapID` and `-setMapID:` to accurately reflect the APIs the ID is used for. Marked the property unavailable but reimplemented its getter and setter to assert with helpful messages. Fixes #1500.
| * | Merge pull request #1615 from mapbox/1ec5-plist-orderMinh Nguyễn2015-05-213-133/+109
| |\ \ | | | | | | | | Fixed account type setting; reworded IB designable message
| | * | Removed unavailable method implementationMinh Nguyễn2015-05-211-4/+0
| | | | | | | | | | | | | | | | This class method is marked unavailable in MGLAccountManager.h, so this code can never be reached.
| | * | Rewrote IB designable messageMinh Nguyễn2015-05-211-124/+101
| | | | | | | | | | | | | | | | IB designables inside frameworks have no access whatsoever to the host app’s bundle (especially if the host app lacks any designables of its own). So it has no way of knowing whether the access token is set in Info.plist. We could continue to check whether it was set programmatically, but we’d still have no way of knowing whether the host app has a Settings bundle, the other prerequisite for displaying Mapbox maps. Therefore, this change removes the Mapbox logo from the designable and displays a reworded reminder unconditionally. It now displays the URL of the “First steps with Mapbox GL for iOS” guide. I kept Mapbox blue in the designable, but as a border, so you can easily tell where the view ends (a major usability problem for custom views in IB).
| | * | Clarified IB designable messageMinh Nguyễn2015-05-211-1/+1
| | | | | | | | | | | | | | | | Access tokens are only required for showing Mapbox-hosted maps.
| | * | Fixed up various Info.plist edge casesMinh Nguyễn2015-05-212-5/+8
| | | | | | | | | | | | | | | | Need to look in the main bundle for Info.plist settings, because the developer has no access to the framework’s Info.plist. Need to check MGLMapboxMetricsEnabledSettingShownInApp before MGLMapboxAccessToken; otherwise, `MGLMapboxEvents` inspects the Settings bundle plist before MGLMapboxMetricsEnabledSettingShownInApp is even checked.
| * | | Merge pull request #1611 from friedbunny/1519-actionsheet-metrics-squashMinh Nguyễn2015-05-211-0/+11
| |\ \ \ | | |/ / | |/| | [squash] Add action sheet shortcut to Settings.app metrics opt-out
| | * | Add action sheet shortcut to Settings.app metrics opt-outJason Wray2015-05-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Only applicable to iOS 8+. Checks if metrics setting has been declared to be offered in app, if not: adds ℹ️ action to open the app's Settings.app section. Fixes #1519. Squash of #1529.
| * | | Merge branch '1ec5-plist-1535'Minh Nguyễn2015-05-204-20/+55
| |\ \ \
| | * | | Observe access token changesMinh Nguyễn2015-05-203-5/+29
| | | | | | | | | | | | | | | | | | | | The singleton `MGLAccountManager` wants to be the sole arbiter of the access token, but each instance of `mbgl::Map` (`mbgl::DefaultFileSource` in #1607) has its own copy of the access token. Now `MGLMapView` observes for changes to the `MGLAccountManager`’s access token and synchronizes `mbgl::Map` with it.