Commit Graph

7400 Commits

Author SHA1 Message Date
Tobrun
551d48883c [android] #4260 - added example to navigate from one activity containing a map to another containing a map 2016-04-20 09:11:01 +02:00
Minh Nguyễn
6069647076 [ios, osx] Override user workspace settings 2016-04-19 16:28:30 -07:00
John Firebaugh
4bc4d35c60 [ios] Build output goes to build/ios 2016-04-19 16:28:30 -07:00
John Firebaugh
a883ac9253 [osx] Build output goes to build/osx 2016-04-19 16:28:30 -07:00
John Firebaugh
2d33ae5ed7 [ios, osx] Eliminate use of main.mk 2016-04-19 16:28:30 -07:00
John Firebaugh
24a9d47944 [ios, osx] Remove some non-functional platform.gyp xcode_settings
Refs #4738
2016-04-19 16:28:30 -07:00
Minh Nguyễn
f8c52d5d38 [osx] Observe annotation coordinates
MGLMapView observes changes to the coordinate property of each MGLAnnotation added to it. Changing the coordinate property in a KVO-compliant way causes the annotation to be relocated and its callout view, if present, to be dismissed. To avoid observing the same annotation twice yet also avoid expensive lookups when adding or removing annotations, MGLMapView indexes added point annotations in an NSMutableSet.
2016-04-19 14:24:59 -07:00
Minh Nguyễn
3976448479 [ios] Refactored annotation image updating 2016-04-19 14:24:59 -07:00
Minh Nguyễn
8a4c2d4b0e [ios] Observe annotation coordinates
MGLMapView observes changes to the coordinate property of each MGLAnnotation added to it. Changing the coordinate property in a KVO-compliant way causes the annotation to be relocated and its callout view, if present, to be dismissed. To avoid observing the same annotation twice yet also avoid expensive lookups when adding or removing annotations, MGLMapView indexes added point annotations in an NSMutableSet.

In iosapp, tapping a callout view moves the selected annotation to the center of the screen and deselects it.

Fixes #1980.
2016-04-19 14:24:59 -07:00
Minh Nguyễn
7a5406bc50 [ios] Update annotations instead of replacing them
When refreshing an annotation’s image, update the annotation instead of replacing it outright.
2016-04-19 14:24:59 -07:00
Minh Nguyễn
bc9b52e0ab [ios] Annotation image deletion
Added an API for deleting unused annotation images’ images. When you nil out the image of an MGLAnnotationImage, MGLMapView deletes the sprite from the style and recreates any annotation associated with the MGLAnnotationImage instance; the MGLAnnotationImage’s falls back to SDK’s default annotation image.

In iosapp, deselecting an annotation resets its image to the default; deselecting it again restores the image.

ref #3185
2016-04-19 14:24:59 -07:00
Tobrun
8703f1ef4b [android] #4754 - double map view example 2016-04-19 21:29:55 +02:00
Minh Nguyễn
3c4049c796 [ios] Toggle telemetry on main queue 2016-04-19 08:54:39 -07:00
Minh Nguyễn
e7ddaa9285 [ios] Assert that defaults change is on main thread 2016-04-19 08:02:57 -07:00
Minh Nguyễn
d76ef6e53b [ios] Fixed hang observing user defaults on background queue
Fixed a deadlock that could occur if the host application attempts to set user defaults on a background queue. Now we observer user defaults changes synchronously.
2016-04-18 23:13:42 -07:00
Minh Nguyễn
b519ee908b [ios] Removed mention of MAPBOX_ACCESS_TOKEN 2016-04-18 18:01:12 -07:00
Minh Nguyễn
17a8079f30 [ios] Prompt for access token in ios-bench
Prompt for an access token before starting benchmarking.

/ref #4728
2016-04-18 17:54:01 -07:00
Minh Nguyễn
6a6b51efbc Revert "[ios, osx] Make {ios,osx}app schemes non-shared"
This reverts commit bc3512773f.
2016-04-18 17:51:53 -07:00
John Firebaugh
5f9582bd60 [osx] Create shared schemas for mbgl-offline, mbgl-render, and test targets that set a working directory (#4742)
These targets expect the working directory to be set to the repository root.
2016-04-18 17:42:43 -07:00
Minh Nguyễn
7606fc6548 [ios] Disable telemetry in simulator
When running in the simulator, disable telemetry outright instead of pointing it to the staging server.
2016-04-18 16:56:14 -07:00
Minh Nguyễn
b3a2c0d53f [ios] Removed app transport security exception for staging
Also removed staging server URL from UI test application.
2016-04-18 16:56:14 -07:00
Minh Nguyễn
4edd1e9658 [ios] Use staging server in simulator
Use the staging telemetry server when compiled for the iOS Simulator.

Fixes #3621.
2016-04-18 16:56:14 -07:00
John Firebaugh
0c44266ffb [osx] Explicitly link SystemConfiguration.framework 2016-04-18 16:48:02 -07:00
Minh Nguyễn
27842221c9 [ios] Replaced MGLMapView redeclaration with internal header 2016-04-18 15:47:47 -07:00
Minh Nguyễn
d86e7323cc [ios] Deprecated -[MGLMapView emptyMemoryCache]
Deprecated -[MGLMapView emptyMemoryCache]. Switched ios-bench to a redeclared -didReceiveMemoryWarning as a workaround.

Fixes #1833.
2016-04-18 15:45:27 -07:00
Minh Nguyễn
1818576fe6 [ios] Made userTrackingMode KVO-compliant
Fixes #4363.
2016-04-18 15:19:15 -07:00
Minh Nguyễn
96e0857227 [ios] Prompt for access token in iosapp
If no access token is found in user defaults at launch, iosapp prompts the user for an access token. Renamed the user defaults key for the access token to conform to Cocoa naming conventions.

Fixes #4696.
2016-04-18 14:57:20 -07:00
Minh Nguyễn
947f28f8bf [ios] Added action to reload style
Fixes #3102.
2016-04-18 14:57:09 -07:00
Minh Nguyễn
a392f972fc [ios] Use downloaded local assets in ios-bench if present
If you’ve gone through the trouble of running iso-bench’s download.sh scripts, use those assets instead of fetching them at runtime from the server.
2016-04-18 14:19:09 -07:00
John Firebaugh
bc3512773f [ios, osx] Make {ios,osx}app schemes non-shared
This avoids the risk of accidentally checking in a MAPBOX_ACCESS_TOKEN environment variable.
2016-04-18 11:42:43 -07:00
John Firebaugh
d8c4dcc13b [ios, osx] gitignore xcuserdata directories 2016-04-18 11:42:43 -07:00
John Firebaugh
fe894ef95e [build] make clean can now remove build directory wholesale 2016-04-18 10:42:41 -07:00
Thiago Marcos P. Santos
7d80690f91 [android] Restore prior GLContext if exists
Apparently some versions of Android, notable 4.4.4 running
on my Nexus 5, creates a GLContext on the Android UIThread
which is the one we are now using for rendering after #2909.

If the context is not restored, nothing gets rendered (or
sometimes partially, or artifacts) because Android will try
to do GL stuff on the context used by Mapbox GL and mess things up.
2016-04-18 18:57:20 +03:00
Bruno de Oliveira Abinader
378885e51a Fix missing generated header include path 2016-04-18 18:19:09 +03:00
Thiago Marcos P. Santos
301b4c7c4e [build] Use which instead of command
`command` is shell buitin on Linux.
2016-04-18 17:50:18 +03:00
Thiago Marcos P. Santos
87b27711d5 [build] Make run-glfw-app not working on Linux 2016-04-18 17:08:20 +03:00
Bruno de Oliveira Abinader
6857002cb9 [build] Bump geojson-vt-cpp to v4.1.2
Minor version bump to resolve cross-compilation issues while using
geojson-vt-cpp v4.1.0.
2016-04-18 14:17:45 +03:00
Bruno de Oliveira Abinader
f397e30622 [build/osx] Fix missing generated header include path 2016-04-18 14:16:51 +03:00
Minh Nguyễn
52abcb5a73 [ios] Animate user dot between user location updates
Use UIView animation to explicitly animate the user dot between user location updates. There is a tricky special case, which is that the callout must point to the annotation view’s implicit frame but must quickly rendezvous with the explicit frame.

Fixes #1041.
2016-04-17 22:44:18 -07:00
Minh Nguyễn
f936295b76 [ios, osx] Include app/OS name/version in user agent
Fixes #3997.
2016-04-17 00:21:23 -07:00
Minh Nguyễn
943c09f1c7 [ios, osx] Took advantage of C99
Now that #4641 has removed the prohibition against C99 extensions, this change removes many pragma statements that suppress warnings about variadic macros and designated initializers. Designated initializers and Elvis operators have been introduced wherever appropriate.
2016-04-16 23:29:40 -07:00
Minh Nguyễn
6da746ac68 [osx] Fixed type mismatch and selector warnings
Fixed some issues that were obscured by the old gyp-generated build settings.
2016-04-16 22:47:26 -07:00
Minh Nguyễn
15769537c3 [osx] Moved SDK from gyp into Xcode project
Added a new Cocoa dynamic framework target target to the main OS X Xcode project. The target is based on the template provided by Xcode. It contains headers and source files in the darwin/ and osx/ subdirectories. Headers are explicitly marked public or project-internal instead of implicitly by subdirectory. Removed the osxsdk target from platform.gypi.

The SDK target has a few dependencies that are managed by mason. Transform the config.gypi generated by configure into an .xcconfig file that Xcode uses to fill in compiler and linker flags.

Added a CI scheme that builds the All aggregate target generated by gyp and the osxapp and SDK test targets.
2016-04-16 22:46:56 -07:00
Minh Nguyễn
7054f808bc [osx] Added Xcode project for osxapp
osx.xcodeproj is an ordinary Xcode project with an ordinary Xcode target for osxapp, contained in an ordinary Xcode workspace that happens to also reference the gyp-generated platform.xcodeproj. The osxapp target links to and embeds Mapbox.framework, which is a product of the gyp-generated platform.xcodeproj.

Moved XIBs into Base.lproj and icons into an asset catalog.

Shared an Objective-C exception breakpoint, disabled by default.
2016-04-16 22:46:26 -07:00
Minh Nguyễn
f83c7a8b81 [ios] Force workspace-relative DerivedData
A workspace places derived data under ~/Library/ by default. We need it to live under build/ for all users. Instead of a legacy-style build products directory, force a workspace-relative DerivedData directory that matches the standard Xcode 4+ layout. Share the workspace settings file that forces the setting. Note that Xcode places its build and index output one level deeper than xcodebuild does.

Also fixed make ipackage-sim by conditionalizing anything related to the .dSYM file, which isn’t generated in the Debug configuration.
2016-04-16 22:46:26 -07:00
Minh Nguyễn
61c9faaf99 [ios] Build for 64-bit simulator 2016-04-16 22:46:25 -07:00
Minh Nguyễn
f0cf8a733a [ios] Updated contributor documentation 2016-04-16 22:46:25 -07:00
Minh Nguyễn
ab9b4b9171 [ios] Specify simulator device
The default is iPhone 4 running iOS 8.1, which doesn’t seem to be the intended device.
2016-04-16 22:46:25 -07:00
Minh Nguyễn
da88060c5c [ios, osx] Fixed project upgrade warnings
Fixed project upgrade warnings in projects managed by gyp.
2016-04-16 22:46:25 -07:00
Minh Nguyễn
85b01eed5b [ios] Fixed make test-ios
For some reason, the SDK tests are less accurate when run on the command line than when run in Xcode or on OS X.

Also fixed unused variable warnings in the tests.
2016-04-16 22:46:25 -07:00