| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
|
|
|
|
|
| |
Also, on iOS 8.0+, use `+[NSLayoutConstraint activateConstraints:]` and `+deactivateConstraints:` to efficiently prevent redundant constraints from lingering.
Fixes #1779.
|
| |
|
|
|
|
| |
Fixes #1026
|
| |
|
|
|
| |
Followup to #1783: Implemented the non-animated version of fit to bounds and makes it a KVO-compliant property.
|
|
|
|
| |
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.
|
|
|
|
| |
Each side of the bounding box is specified independently, allowing more flexibility than the offset + padding construct supported in mapbox/mapbox-gl-js’ Camera.
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
For consistency with MapKit, the Google Maps SDK, and these methods’ own documentation.
Fixes #1780.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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/.
|
|
|
|
| |
Fixes #1730.
|
| |
|
|
|
|
| |
This reverts commit 2435c1ad2603432186ee61eb4c423244a088bc51 (#1710), which needs to be revisited in light of #1655, which is a much higher priority at the moment.
|
|
|
| |
Fixes #1717.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(only works correctly when rotated to north, but this is a just a debug functionality anyway)
|
|\
| |
| |
| |
| | |
Conflicts:
src/mbgl/renderer/painter_fill.cpp
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| | |
for general events processing
|
| | |
|
| | |
|
| |
| |
| |
| | |
rejections
|
| | |
|
| |\
| | |
| | | |
Pull self-less utility methods out of MGLMapView into functions
|
| | |
| | |
| | |
| | | |
Also include the name of the requested resource when asserting because one can’t be found.
|
| |\ \
| | |/
| |/|
| | | |
mapID → styleID
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |\ \
| | | |
| | | | |
Fixed account type setting; reworded IB designable message
|
| | | |
| | | |
| | | |
| | | | |
This class method is marked unavailable in MGLAccountManager.h, so this code can never be reached.
|
| | | |
| | | |
| | | |
| | | | |
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).
|
| | | |
| | | |
| | | |
| | | | |
Access tokens are only required for showing Mapbox-hosted maps.
|
| | | |
| | | |
| | | |
| | | | |
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.
|
| |\ \ \
| | |/ /
| |/| | |
[squash] Add action sheet shortcut to Settings.app metrics opt-out
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|