Commit Graph

80 Commits

Author SHA1 Message Date
Mike Morris
dfb36d6231 [core] move mbgl.gyp to gyp directory
So npm won't clobber binding.gyp, refs
https://github.com/npm/npm/issues/10243
2015-11-04 11:34:35 -05:00
Minh Nguyễn
557b8afb7c [core][iOS] Source iOS styles from default_styles
Moved mbgl::util::default_styles to a more appropriate location, where iOS platform code can also find it. Moved -[MGLMapView bundledStyleURLs] (which is now deprecated) and the style switcher in iosapp to default_styles.

Added a collection of convenience methods for getting style URLs. It makes little sense to layer an enum atop this, as MapKit does, because MGLMapView styles aren’t limited to this set. A good analogy is UIColor. This also makes for a good entry point for future runtime styling APIs.

Introduced independent constants for each default style, because it’s more common to need access to a particular style than to iterate over them. This fact is apparent in the MGLStyle class, which now uses macros and assertions to ensure that it’s kept up-to-date with changes in default_styles.

/ref #1462
2015-10-30 13:09:37 -07:00
Leith Bade
abf93c008b [core] Remove bundled styles.
Fixes #2239
2015-10-30 13:09:04 -07:00
Minh Nguyễn
d48c640b5c More natural style names in iosapp
ref #2740
2015-10-26 14:55:19 -07:00
Leith Bade
f71d61fa91 [android] Add missing satellite streets style to Android and iOS.
As well as default_styles.cpp
Fixes #2739
Fixes #2740
2015-10-23 14:09:24 +11:00
Justin R. Miller
6e1b1836f4 fixes #2611: iOS test app long press drops debug marker 2015-10-15 11:33:58 -07:00
Justin R. Miller
8cc3b12f1e [ios] fixes #2490: add annotation image enabled property 2015-10-02 11:50:53 -07:00
Adam Hunter
fa2d7453a5 Fix up of some naming issues, etc. 2015-09-29 15:07:39 -07:00
Adam Hunter
3f9f259619 Added GL logging utility 2015-09-29 15:07:39 -07:00
Jason Wray
d89aa51e0f [iOS] Give iosapp the option to use always location permissions
Useful in testing metrics and background location. Default is still
`whenInUse`, user must switch in `Settings.app`.
2015-09-22 05:53:42 -04:00
Minh Nguyễn
79dc20808f Prefix user defaults in iosapp
We technically don’t need to, but the demo app should practice good hygiene since we expect developers to copy from it.
2015-09-16 13:22:16 -07:00
Jason Wray
9a55e97029 Fix build, only ask for location permission on user's instigation
Previously in #2265 we would ask for location permission at app startup if `!settings->showsUserLocation`. #2193 0a172a21fd changed the way we used `NSUserDefaults` and mostly removed the `settings` object, which broke #2265.

Rather than fix our pestering location permissions ask at startup, this commit now only asks for location permissions when the user hits the locate-me button.

Once a user grants permission, the user dot appears because a `userTrackingMode` is set, `showsUserLocation` is permanently set to `YES` in `NSUserDefaults` and is restored at launch.
2015-09-08 11:43:55 -04:00
Minh Nguyễn
0a172a21fd CameraOptions
Plumbed camera options all the way through to MGLMapView. Added a method that lets you specify a direction in addition to center point and zoom level.

Added Map::jumpTo() for parity with mapbox-gl-js. Replaced usage of Map::setLatLng() and Map::setLatLngZoom() with Map::jumpTo() or Map::easeTo() within MGLMapView. Replaced MGLMapView.pitch with MGLMapCamera for setting all supported degrees of freedom simultaneously. Simultaneously move and rotate with course.

Support customizable timing functions on iOS.

iosapp now persists an archived MGLMapCamera instead of separate viewpoint properties and also synchronizes user defaults on termination. This change implements persistence entirely in Objective-C, eliminating the use of the Objective-C++ implementation.

Fixes #1643, fixes #1834. Ref #1581.
2015-09-07 09:22:52 -07:00
Jason Wray
584c36f348 Update NSLocationWhenInUseUsageDescription string
Fixes #1930
2015-09-04 17:54:46 -04:00
Jason Wray
a07770450c Fix location permissions ask, add delay for map to load 2015-09-04 17:54:46 -04:00
Jason Wray
42dc5336db iOS perspective gesture support
Drag two fingers upward to tilt the map.

Implements #2116
2015-08-26 11:23:03 -07:00
Justin R. Miller
a2ee2bcdae remove Bright, Basic, and Outdoors from iOS testing 2015-08-24 11:56:24 -07:00
Justin R. Miller
92dd26c8be iOS app/framework fixes for v8
- Mapbox Streets -> Streets
 - style version from string to integer
 - 7 -> 8
2015-08-24 11:34:03 -07:00
Justin R. Miller
3f99f5e712 GL is the library, SDK is the product 2015-08-21 11:01:07 -07:00
Minh Nguyễn
20ad0d51f6 Added UI for course tracking 2015-08-14 10:09:44 -07:00
Minh Nguyễn
dfeb479011 MGLUserTrackingModeFollowWithCourse
Added course-tracking. However, rotation has to happen atomically without animation until #1834 is fixed.

Fixes #1605.
2015-08-14 10:09:43 -07:00
Jason Wray
c1cd961093 Include app-info.plist in demo app project
[skip ci]
2015-07-28 10:18:30 -04:00
Minh Nguyễn
0178c94f6d Exempt Metrics staging server from PFS requirement
This server should not used in actual production code anyways.

Fixes #1937.
2015-07-27 15:52:17 -07:00
Justin R. Miller
c7011345c9 remove logging 2015-07-08 19:46:04 +02:00
Justin R. Miller
a1c2529e33 runtime imagery based on annotation title 2015-07-08 19:46:04 +02:00
Justin R. Miller
e0da13dbfd fixes for runtime Cocoa imagery 2015-07-08 19:46:04 +02:00
Justin R. Miller
5ab58deb44 Cocoa custom marker imagery API 2015-07-08 19:46:03 +02: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
256b748458 Merge branch '1ec5-plist-1535' 2015-05-20 14:38:36 -07:00
Brad Leege
5572504d38 Merge pull request #1589 from mapbox/1396-info-plist-only
Manage Metrics TEST URL Via Info.plist
2015-05-18 21:40:26 -05:00
Minh Nguyễn
b7b4515d48 Marked unused parameters with __unused
Replaced haphazard usage of pragmas and `(void)` expressions with the `__unused` keyword.
2015-05-18 17:11:12 -07:00
Brad Leege
fa34b53964 #1396 - Refactoring Metrics Test Server URL configuration to be drive via Info.plist 2015-05-18 18:15:15 -05: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
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
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
48e21ae6e9 #1516 - Adding explicit checks for developer implementation of user Opt Out functionality 2015-05-11 23:31:22 -05:00
Minh Nguyễn
bb788f56f2 Renamed settings keys
The new keys fit the standard naming convention for Info.plist keys and more clearly communicate how they’re to be used.
2015-05-08 11:51:48 -07:00
Brad Leege
804c092c81 #1225 - Simplifying MGLAccountManager for initial setup and access to AccessToken 2015-05-05 11:50:01 -05:00
Brad Leege
4ce4e979ff Updating from master 2015-05-04 17:04:46 -05:00
Brad Leege
0e36bf1c8d #1225 - Restoring MapboxGL.h as an Umbrella header file by splitting the singleton code into MGLAccountManager.h and .m 2015-05-04 16:13:18 -05:00
Konstantin Käfer
473aa281c7 make meta-target for all iOS targets too and split up project.gyp
this will make it easier to add more targets to iOS builds in the future. It'll also help by having Xcode files named after the platform they're for, so it's easier to distinguish windows
2015-04-28 16:16:09 +02:00
Minh Nguyễn
5ffa52cab5 Automatically find view controller for layout guides
Find the managing view controller by traversing the responder chain.
2015-04-27 15:52:30 -07:00
Brad Leege
50fecb916d #1345 - Adding app build number to user agent. Updating gl test app build number to be different from build version. 2015-04-27 11:43:23 -04:00
Brad Leege
7e145780eb #1225 - Initial conversion of Mapbox GL app to set access token in AppDelegate and exposing MGLMapView.initWithFrame to support it 2015-04-23 18:15:01 -05:00
Justin R. Miller
190709c6b1 fixes #1157, #1255: cache parsed tiles in memory 2015-04-16 01:15:41 -07:00
Justin R. Miller
32e5196373 change default style to Streets 2015-04-10 16:38:49 -07:00
Justin R. Miller
18ef67b002 Revert "Override file name for Mapbox Streets style JSON"
Mapbox Streets has stock naming again; reverting. Easier
to ensure we name properly than build in logic.

This reverts commit 0b35a88708.
2015-04-10 16:34:42 -07:00
Justin R. Miller
159ffddefd show Dark style in demo app 2015-04-09 23:45:04 -07:00
Minh Nguyễn
fc3802eddb Merge pull request #1239 from friedbunny/locate-button
Add simple tracking mode button to demo app
2015-04-09 09:56:01 -07:00
Jason Wray
be599fa385 Animate the thing, I'm not an animal 2015-04-09 00:03:17 -07:00