Commit Graph

107 Commits

Author SHA1 Message Date
Minh Nguyễn
8a971458a4 Removed documentation for unavailable method
So it doesn’t show up in the generated docset.
2015-07-08 13:49:07 -07:00
Justin R. Miller
e0384a98f7 explicitly bring in header 2015-07-08 19:46:04 +02:00
Justin R. Miller
445d3afa4f fix nullability 2015-07-08 19:46:04 +02:00
Justin R. Miller
e3b823b11b nullability for MGLAnnotationImage 2015-07-08 19:46:03 +02:00
Justin R. Miller
5ab58deb44 Cocoa custom marker imagery API 2015-07-08 19:46:03 +02:00
Justin R. Miller
76333dfc0c fixes #1770: rename & expose compass, logo, and attribution 2015-07-01 12:09:33 -04:00
John Firebaugh
6532438fe4 Rationalize *RenderingMap notifications 2015-06-30 10:13:24 -07:00
Minh Nguyễn
ac2ad993a5 Fit to coordinates
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.
2015-06-26 21:46:15 -07:00
Minh Nguyễn
29fd554c32 Implemented -setVisibleCoordinateBounds:
Followup to #1783: Implemented the non-animated version of fit to bounds and makes it a KVO-compliant property.
2015-06-25 22:26:35 -07:00
Minh Nguyễn
1d11624efd Test fit to bounds; added MGLCoordinateBounds functions
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.
2015-06-25 21:54:57 -07:00
Minh Nguyễn
68e404c522 Fit to bounds with padding
Each side of the bounding box is specified independently, allowing more flexibility than the offset + padding construct supported in mapbox/mapbox-gl-js’ Camera.
2015-06-25 21:54:57 -07:00
Minh Nguyễn
c57799f26c Reimplemented fit to bounds
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.
2015-06-25 21:54:53 -07:00
Justin R. Miller
0955dfc19f Merge branch 'release-v0.4.0' 2015-06-19 15:56:53 -07:00
Justin R. Miller
afb7095ecc refs #1759: remove header docs for now-unavailable API 2015-06-19 11:07:24 -07:00
Minh Nguyễn
91641ffb01 Lightweight generics
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/.
2015-06-17 15:33:00 -07:00
Minh Nguyễn
e3e73220c1 Audited shape annotation classes for nullability
Audited various classes to match MapKit. Also, `-[MGLAnnotation title]` is nullable because titles are optional for shape annotations.
2015-06-17 12:55:05 -07:00
Minh Nguyễn
f50a27bc8a Corrected bundledStyleURLs doc comment
Per f46328655e (commitcomment-11695358).
2015-06-17 12:54:48 -07:00
Minh Nguyễn
0686807a21 Audited shape annotation classes for nullability
Audited various classes to match MapKit. Also, `-[MGLAnnotation title]` is nullable because titles are optional for shape annotations.
2015-06-16 16:32:57 -07:00
Minh Nguyễn
df6ab1dc00 Corrected bundledStyleURLs doc comment
Per f46328655e (commitcomment-11695358).
2015-06-16 09:45:10 -07:00
Justin R. Miller
bd0bf294bf squash of #1655: shape annotations support for core & iOS 2015-06-15 18:30:39 -07:00
Minh Nguyễn
450a6beae0 Restored nullability compatibility shim
This reverts commit a425df0f95f5f0088444b8ebc67708756ff962aa for compatibility with Xcode 6.1.
2015-06-13 19:58:59 -07:00
Minh Nguyễn
f46328655e Audited headers for nullability
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.
2015-06-11 11:37:23 -07:00
Minh Nguyễn
86dd0e99bc Defailablize init methods
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.
2015-05-27 12:51:30 -07:00
Minh Nguyễn
0689ad693e Merge pull request #1561 from 1ec5-style-id-1500
mapID → styleID
2015-05-21 15:28:27 -07:00
Minh Nguyễn
c718d2ea66 Made accessToken uninspectable 2015-05-21 01:51:18 -07:00
Minh Nguyễn
256b748458 Merge branch '1ec5-plist-1535' 2015-05-20 14:38:36 -07:00
Minh Nguyễn
9a57464f82 Removed accessToken from MGLMapView public API
With helpful instructions for migrating to Info.plist or the `MGLAccountManager` API.
2015-05-20 10:45:26 -07:00
Minh Nguyễn
245823e474 Removed “private” header
Instead of exposing these methods in a private header that winds up triggering warnings publicly, just redeclare the methods in a category. Since this is a test app, we’ll catch any issues that arise from refactoring simply by testing.

Fixes #1579.
2015-05-18 11:55:54 -07:00
Minh Nguyễn
2c7d0567fa Privatized MGLMapboxEvents
`-pauseMetricsCollection` and `-resumeMetricsCollection` were originally introduced to mitigate concerns around battery usage, but `MGLMapboxEvents` has since evolved to tread much lighter on the battery. There’s no longer any need for the client to call these methods directly. The iOS test project now includes MGLMapboxEvents.h explicitly to avoid having to package a header that will go unused.
2015-05-18 11:55:54 -07:00
Minh Nguyễn
27e5d18c42 Merge pull request #1573 from mapbox/1ec5-designable-redux-1568
Restore IB designable support
2015-05-16 21:36:24 -07:00
Minh Nguyễn
563fed5ca9 Properly fail to load the map
A typo in a selector literal meant that `-[MGLMapViewDelegate mapViewDidFailLoadingMap:withError:]` would never be sent to delegates even if `MGLMapView` had called it. Along for the ride, create a proper `NSError` to pass into that callback, and an error domain for that error.
2015-05-16 20:26:28 -07:00
Minh Nguyễn
b6a4ee0615 Revert "refs #1568: remove IBDesignable support for now"
This reverts commit 5a918cbb2c. The designable works fine because of #1469.

Fixes #1568.
2015-05-16 15:34:31 -07:00
Justin R. Miller
5a918cbb2c refs #1568: remove IBDesignable support for now 2015-05-15 14:59:19 -07:00
Minh Nguyễn
00b2e13b64 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.
2015-05-14 14:49:26 -07:00
Minh Nguyễn
0ad76c95d2 Obsoleted +setMapboxMetricsEnabledSettingShownInApp:
Made `+[MGLAccountManager setMapboxMetricsEnabledSettingShownInApp:]` unavailable, with a message explaining what to do instead. Removed a commented-out call to that method. Only the environment for an access token if one hasn’t already been set in Info.plist.
2015-05-13 22:33:03 -07:00
Minh Nguyễn
2529baa62b Grab access token and other app-wide data from Info.plist
That way there’s no ambiguity about when you should call things like `+[MGLAccountManager setMapboxMetricsEnabledSettingShownInApp:]`. In fact, that method is now deprecated because it’s so easy to call in the wrong place.

Fixes #1535.
2015-05-13 15:33:28 -07:00
Justin R. Miller
6519d23611 Merge pull request #1491 from mapbox/1ec5-metrics-opt-way-out
refactor metrics system to immediately jettison data & tracking when users opt out
2015-05-12 18:48:10 -07:00
Minh Nguyễn
f140733414 Merge pull request #1528 from mapbox/1516-getter
Adding Getter Method
2015-05-12 18:45:11 -07:00
Brad Leege
0a1e89a9ca Merge pull request #1520 from mapbox/1516-opt-out-checking
Explicit Opt Out Checking
2015-05-12 18:44:49 -07:00
Justin R. Miller
efc4bb4ef6 add header docs for new MGLAccountManager; reorg 2015-05-12 16:44:26 -07:00
Justin R. Miller
18b96ec4fd fix spacing, ordering, imports 2015-05-12 16:33:32 -07:00
Minh Nguyễn
b1992a4516 Merge branch 'master' into 1ec5-metrics-opt-way-out 2015-05-12 16:09:10 -07:00
Brad Leege
8548ab0346 #1516 - Adding public setter method to MGLAccountManager.h. Fixing example signal opt out in MBXAppDelegate. 2015-05-12 11:37:40 -05:00
Brad Leege
87551c6d0e #1516 - Renaming setShowsOptOutInApp to setMapboxMetricsEnabledSettingShownInApp for app consistency. Implementing wordsmith edits to NSAssert text. Removing technical debt. 2015-05-12 10:50:46 -05:00
Minh Nguyễn
54a703bcb2 Consolidated logic for pausing/resuming MGLMapboxEvents
`MGLMapboxEvents` automatically recreates its location manager when the host app is reauthorized for Location Services. Added some redundancy to ensure that there is no location manager when either Location Services or Mapbox Metrics is off.
2015-05-12 01:38:04 -07:00
Minh Nguyễn
2f02a6538e Folded MGLMetricsLocationManager into MGLMapboxEvents
`MGLMetricsLocationManager` was nothing but overhead for `CLLocationManager`. Also removed an unused method.
2015-05-12 01:36:56 -07:00
Minh Nguyễn
f860169f35 Refactored MGLMapboxEvents for better data management
The shared `MGLMapboxEvents` now owns the only instance of `MGLMetricsLocationManager`. It also owns a `MGLMapboxEventsData` object, to which all user-specific data has been relegated. This object can be built up and torn down on the fly, whenever the opt-out preference is toggled. `MGLMapboxEvents` has also given up knowledge of the access token and now queries `MGLAccountManager` for that information, which `MGLMapView` keeps up-to-date.
2015-05-12 01:36:56 -07:00
Brad Leege
48e21ae6e9 #1516 - Adding explicit checks for developer implementation of user Opt Out functionality 2015-05-11 23:31:22 -05:00
Justin R. Miller
8cb146fa02 don't doc or package private headers 2015-05-05 15:13:39 -07:00
Brad Leege
acd27fc386 Merge pull request #1329 from mapbox/1225-start-token
MapboxGL Startup Infrastructure
2015-05-05 13:00:25 -05:00