Commit Graph

1783 Commits

Author SHA1 Message Date
Jason Wray
4919099ea9 [ios] Add MGLMapView.showsScale to control scale bar visibility (#11335)
- Fixes scale bar not being visible until a camera change event.
- Adds IBInspectable for scale bar visibility.
- Add tests of the scale bar being added to the map view
2018-03-02 13:13:57 -05:00
Jason Wray
ab27e24ab0 [ios] Restore iosapp's HUD visibility, adjust placement 2018-02-27 18:27:42 -05:00
Jason Wray
68a9e2ea92 [ios] Provide haptic feedback when user rotates to due north 2018-02-27 18:27:42 -05:00
Chris Loer
66609c9751 [ios] Add "clear tile cache on entering background" to changelog. 2018-02-27 18:27:16 -05:00
Molly Lloyd
2dddcba3fc [ios, macos] cherry-pick darwin changes to tileset encoding param onto boba (#11324)
* [ios, macos] add tileset encoding option to darwin sources (#11274)

* add tileset encoding option to darwin sources

* correct style guide

* link out to dem encoding docs

* markdownify comments

* correct changelog
2018-02-27 15:12:25 -08:00
Jordan Kiley
db0f6377fc Fixed DDS polygon example (#11286)
* [ios] Updated expression

* [ios] Removed centering code
2018-02-23 22:19:51 -08:00
Minh Nguyễn
0525fd1e4a [ios, macos] Unwrap coordinate bounds
Updated coordinate bounds conversion methods to use the beyond-±180 method to indicate that the bounds extends beyond the antimeridian. Also copyedited conversion documentation.
2018-02-21 10:05:30 -08:00
Julian Rex
25629c81a6 [ios] Podspec bump 4.0.0-beta.2 (#11263)
* [ios] Podspec bump 4.0.0-beta.2

* [ios] Improved change log messaging.
2018-02-20 15:46:35 -05:00
Jason Wray
c2be33fa41 [ios] Bump podspecs for 3.7.5 2018-02-20 14:23:42 -05:00
Jason Wray
00abd2eaa6 [ios] Fix loop when first asking for location permission (#11229) 2018-02-20 14:23:42 -05:00
Jason Wray
f6d652dddd [ios] Fix safeAreaInsets availability warning in MGLMapViewLayoutTests
Fixes: 'safeAreaInsets' is only available on iOS 11.0 or newer [-Wunguarded-availability-new]
2018-02-20 14:23:42 -05:00
Jesse Bounds
2e3145db47 Replace embedded telem implementation with mapbox-mobile-events library (#10698)
* [ios] Introduce mobile events dependency

This adds the mobile events dependency including the events library's namespaced header file so that the related compiled symbols are prefixed to make them specific to the maps SDK. A pre-compiled header file is added so that the namespaced header file is added in all places where it is needed (most importantly every events library file).

* [ios] Use new events library for telemetry events

This makes the following significant changes:

Refactors the MGLMapboxEvents singleton to delegate internally to an instance of MMEEventsManager that it keeps for itself. The MGLMapboxEvents public API is refactored to reflect this. Note: MGLMapboxEvents continues to handle checking for opt out

Uses that new events API in MGLMapboxEvents to send all telem events (and turnstile)

All embedded certs are removed since the new telem library uses public key info pinning

Legacy telemetry utility classes for location and networking are removed since those are implemented in the telem library

* [ios] Update submodules initialized by cmake

We no longer bring in SMCalloutView as a submodule so it is removed.
We now vendor the telemetry events library as a submodule so it is added.

* Update mapbox-mobile-events

* Update mobile events lib

* Set events options with MGL user defaults values

For options that historically could be set with user defaults in the Maps SDK, collect them and set the appropriate property values in the new events library.

Also, check the existence of two new optional configuration values MGLTelemetryAccessToken and MGLTelemetryBaseURL so that the events endpoint and access token can be configured and the access token can easily be set dynamically and apart from the access token for the maps API.

MGLTelemetryBaseURL replaces the legacy MGLTelemetryTestServerURL. This is ok because this value was never intended to be used by client applications. The new name better reflects the fact that the URL can be changed to any backend stack, not just a test server.

Because it is possible for the configuration values to be read from user defaults before the events manager is fully set up, this also adds a local cache for the baseURL and accessToken values so that they can be stored and applied once it is time to setup the the events manager.

* Update mapbox-mobile-events

mapbox-mobile-events was forced pushed to include https://github.com/mapbox/mapbox-events-ios/pull/28

* Rename MGLMapboxEvents singleton access method

Manager is not in the name of the class. Just call it an instance.

* Update mapbox-mobile-events

* Add comments about config value loading

* Guard against creating events for IB

* Refactor user defaults update handler

This updates the handling logic for user defaults to break apart config changes that require a check for pausing or resuming the events lib’s telemetry collection from config changes that can happen with no update to the pause/resume state.

It also ports the optimization from https://github.com/mapbox/mapbox-gl-native/pull/10803 so that the call to pause and resume is not performed unless the user defaults store has new values that have not yet been applied to the events library.

* Update mapbox-mobile-events

* Rename events submodule folder

* Fix incorrect events library refs

* Update mapbox-mobile-events

* Update user user agent id value

This value aligns with our schme of {source-sdk-platform} and will be used by the events library in the user agent and vendorid.

* Update mapbox-mobile-events

Pin to v3.0.0 (d522b18)

* Improve code comments

* [ios] Fixed a broken file reference to MGLTelemetryConfig.
2018-02-20 09:54:11 -05:00
Jordan Kiley
9459cf6a91 [ios, macos] Mark deprecated methods as unavailable (#11205)
Fixes #10735
2018-02-16 16:20:08 -08:00
Fabian Guerra
12103c95c0 [ios, macos] Remove the duplicated entries in changelogs. 2018-02-16 13:25:28 -05:00
Fabian Guerra
903e7989ec Merge branch 'master' into release-boba
# Conflicts:
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
#	platform/android/scripts/exclude-activity-gen.json
#	platform/ios/CHANGELOG.md
#	platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
#	platform/ios/Mapbox-iOS-SDK-symbols.podspec
#	platform/ios/Mapbox-iOS-SDK.podspec
#	platform/macos/CHANGELOG.md
2018-02-15 11:54:51 -05:00
Vladimir Agafonkin
82de856c94 [core, ios, macos, android, node] Heatmap layer (#11046)
Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com>
Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
2018-02-15 17:38:23 +02:00
Chris Loer
d4df044ffe [ios] Release cached tiles on entering background.
Retain current render tiles for fast restart.
Waiting for a memory warning doesn't work because we can't make GL release calls once we're in the background.
2018-02-14 10:55:16 -08:00
Chris Loer
a11b277bc1 [core] Rename "onLowMemory" to "reduceMemoryUse".
Android still calls "reduceMemoryUse" only while handling a low memory event.
iOS, on the other hand, calls "reduceMemoryUse" every time it enters the background.
2018-02-14 10:55:16 -08:00
Jesse Bounds
b31eae7514 [ios] Remove unused reference to reachability
This removes a reference to reachability that has been used and incorrect since the file does not exist at the referenced location.
2018-02-13 12:16:19 -05:00
Fabian Guerra
b68266953f Merge tag 'ios-v3.7.4' into master
# Conflicts:
#	include/mbgl/style/conversion/tileset.hpp
#	include/mbgl/util/tileset.hpp
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/ios/CHANGELOG.md
#	platform/ios/ios.xcodeproj/project.pbxproj
#	platform/macos/CHANGELOG.md
#	src/mbgl/layout/symbol_projection.cpp
#	src/mbgl/renderer/tile_pyramid.cpp
#	src/mbgl/style/conversion/tileset.cpp
2018-02-13 11:40:40 -05:00
Fabian Guerra Soto
3a0c87b1b4 [ios] Bump podspec to 3.7.4 (#11179)
* [ios] Bump podspec to 3.7.4

* [ios, macos] Update changelogs.
2018-02-12 17:37:00 -05:00
Fabian Guerra Soto
024e75bd56 [ios, macos] Fix memory leaks in MGLMapSnapshotter. (#11133) 2018-02-12 16:47:16 -05:00
Julian Rex
9ee99c91bb [ios] Adds camera change delegate methods with reason parameter. (#11151)
Added missing notification handler for UIApplicationWillResignActiveNotification.
2018-02-12 16:37:21 -05:00
Minh Nguyễn
101b55b0f0 [ios, macos] Added option to restrict tile source to bounds
Cherry-picked from c3bf7c55a1.
2018-02-08 12:39:30 -08:00
Minh Nguyễn
c3bf7c55a1 [ios, macos] Added option to restrict tile source to bounds 2018-02-08 12:03:27 -08:00
Minh Nguyễn
e6d6a231e8 [ios, macos] Added Danish localization 2018-02-07 02:34:29 -08:00
Minh Nguyễn
bffc834ff1 [ios] Updated Swedish translations 2018-02-07 02:34:29 -08:00
Minh Nguyễn
6757456e16 [android, ios, macos] Updated Russian translations 2018-02-07 02:34:29 -08:00
Minh Nguyễn
1d48a7d2ff [ios] Removed byte order mark 2018-02-07 02:34:29 -08:00
Randall C Lee
638ab799ed Adjust radius (#11132) 2018-02-06 15:34:46 -05:00
Randall C Lee
332dad2a4e [ios] Add Radius Configuration (#11070)
* Add Radius Configuration

* Remove default config

- removes default configuration
- moves config setup to events init method
- renames config class

* Delete MGLConfig header file
2018-02-05 16:17:57 -05:00
Minh Nguyễn
02e6265c83 [ios] Made NSExpression+MGLAdditions.h public 2018-01-29 21:34:41 -08:00
Fabian Guerra Soto
306898d77b [ios] Update changelog and bump pod spec to 4.0.0-beta.1 (#11069)
* [ios] Update changelog and bump pod spec to 4.0.0-beta.1

* [ios, macos] Reorganized changelog entries

* [ios] Add missing changelog entries.

* [ios, macos] Rolled up core changes into changelogs
2018-01-26 15:56:03 -05:00
Minh Nguyễn
045392938b [ios] Fixed syntax error in style author guide 2018-01-26 10:42:23 -08:00
Fabian Guerra
91521fa106 [ios] Fix image property of MGLAnnotationImage does not update. 2018-01-26 10:20:30 -05:00
Minh Nguyễn
b6747a84f4 [ios, macos] Hook up hillshade style layers, raster DEM sources to iOS/macOS (#11036)
* [ios, macos] Finished implementing MGLHillshadeStyleLayer

* [macos] Added icon for hillshade layer

Also set the background layer icon to mirror in right-to-left locales.

* [ios, macos] Implemented raster DEM source

* [macos] Added Enhance Terrain debugging command

* [ios, macos] Simplified raster DEM source example
2018-01-25 10:46:27 -08:00
Minh Nguyễn
fb5b8d34f2 Reimplement style values atop NSExpression (#10726)
* [ios, macos] Import headers, not implementation files

* [core] Added accessors for various expression parameters

Added missing parameter accessors to various expression operator classes, as well as a method on InterpolatorBase and Step that enumerates the stops and their values.

* [ios, macos] Silenced warning in test of error condition

* [ios, macos] Made MGLSphericalPosition boxable

* [ios, macos] Implemented array enumeration during conversion

* [ios, macos] Temporarily ignore heatmap layer type

* [ios, macos] Migrated MGLSymbolStyleLayer.text to NSExpression

MGLSymbolStyleLayer.text is now of type NSExpression instead of MGLStyleValue, as a first step toward migrating the entire layer API from style values to expressions.

Implemented conversions from NSExpression to JSON arrays and vice versa. The most common NSExpression functions are now converted into style expressions, but not all of the most common style expression operators are supported yet.

* [ios, macos] Implemented string coercion

* [ios, macos] Color literals

* [ios, macos] Null constant expressions

* [ios, macos] Convert dictionary literals

* [ios, macos] Interpolation expressions

* [ios, macos] to-boolean, to-number, get from object

* [ios, macos] Variable expressions

Implemented custom expression functions for assigning and referring to variables within the context of an expression. Variables are assigned via a “context dictionary” and applied to an subexpression that is given as another argument to the same expression. Also implemented built-in variable expressions for zoom level and heatmap density.

* [ios, macos] Convert colors, offsets, padding in expressions to JSON objects

* [ios, macos] Expression-based style property getters

Implemented a conversion from mbgl::style::PropertyValues to Objective-C JSON objects, which are then converted to NSExpressions.

* [ios, macos] Consolidated property value–expression conversion in MGLStyleValueTransformer

* [ios, macos] Predicate and expression guide

Extracted documentation about predicates from a documentation comment in MGLVectorStyleLayer.h to a new jazzy guide. Added details about NSExpression support as well. Began updating the “For Style Authors” guide to reflect the transition from style values to expressions.

* [ios, macos] Updated style authoring guide

Updated the Information for Style Authors guide to discuss expressions instead of style functions. Included a table mapping style specification expression operators to NSExpression syntaxes.

* [ios, macos] Migrated codegen templates to expressions

* [ios, macos] Applied expression changes via codegen

Ran make darwin-style-code.

* [macos] Migrated macosapp to expressions

* [ios, macos] Updated style function guide

This guide needs to be thoroughly rewritten, but for now the example code has been migrated to expressions.

* [ios, macos] Eviscerated style function tests

* [ios, macos] Updated changelogs

* [ios] Migrated iosapp to expressions

* [ios, macos] Exposed JSON conversion methods publicly

* [ios, macos] Removed MGLStyleValue, MGLStyleFunction
2018-01-24 00:04:02 -08:00
Molly Lloyd
f3294200c6 [core] add raster-dem source type and hillshade layer type (#10642) 2018-01-23 10:49:23 -08:00
Minh Nguyễn
4fc070dcfd [ios, macos] Converted strings files to UTF-8 2018-01-19 18:09:59 -08:00
Minh Nguyễn
7cc0029758 [android, ios, macos] Updated Ukrainian translations 2018-01-19 18:09:59 -08:00
Minh Nguyễn
2820d97237 [android, ios, macos] Updated Swedish translations 2018-01-19 18:09:59 -08:00
Minh Nguyễn
e329004f26 [android, ios, macos] Updated French translations 2018-01-19 18:09:59 -08:00
Andrew Kitchen
d0193c5b2b Restores fix to MGLOpenGLStyleLayer memory-related crash (#10765)
Revert this commit to see integration test fail.
2018-01-19 20:28:57 -05:00
Andrew Kitchen
2c48871c06 Adds an integration test harness to the iOS project
This will allow us to write lightweight integration tests between MGLMapView and the core renderer.
Also includes a test for the recent custom layer memory fix, reverting the fix in order to demonstrate the failing test.
2018-01-19 20:28:57 -05:00
Minh Nguyễn
40a0b2deb7 [android, ios, macos] Added Hebrew localization 2018-01-19 15:57:54 -08:00
Jason Wray
7c2e8c5eb1 [ios] Remove support for 32-bit simulators (i386)
And restore some docs that got lost in a merge.
2018-01-19 10:25:17 -05:00
Jason Wray
42845ad63f [ios] Optimize MGLAnnotationView scale transform when not pitched 2018-01-18 13:59:43 -05:00
Jesse Bounds
fa3dee93f8 [ios] Remove unused reference to reachability
This removes a reference to reachability that has been used and incorrect since the file does not exist at the referenced location.
2018-01-17 11:52:48 -08:00
Fabian Guerra
42bcb4b405 Merge branch 'release-agua' into master
# Conflicts:
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/ios/CHANGELOG.md
#	platform/ios/ios.xcodeproj/project.pbxproj
#	platform/macos/CHANGELOG.md
2018-01-17 09:41:37 -05:00
Jason Wray
0806e16eb3 [ios] Fix and expand accessibility feature transliteration
- Fixed pre-iOS 11 compatibility.
- Expanded transliteration to all supported languages.
2018-01-10 17:26:11 -05:00