Commit Graph

219 Commits

Author SHA1 Message Date
Jason Wray
1c99b199c6 [ios] Fix string-bool casting warning in MBXOfflinePacksTableViewController 2019-02-14 10:51:49 -08:00
Julian Rex
5ba4a6a980 [ios] Reverts "Enable customize positions of mapview ornaments (#13556)" (#13870)
This reverts commit e22d28c285.
2019-02-05 13:50:12 -05:00
Lloyd Sheng
e22d28c285 [ios] Enable customize positions of mapview ornaments (#13556)
* APIs for customize positions of ornaments

* Adopt anchors layout

* Remove iOS8 layout code
2019-01-30 15:39:29 +08:00
Fabian Guerra Soto
7069ecb2a1 [ios, macos] Add Czech and Hungarian translations. (#13782)
Added Czech translations.
2019-01-23 14:08:35 -08:00
Minh Nguyễn
6ca2f6c97f [ios] Display map on connected displays
Whenever an external display is connected, show a map synchronized with the main map on the main display.
2019-01-14 15:07:43 -08:00
tobrun
4e86bca5ab [all] - update licenses to 2019 2019-01-04 08:58:09 +01:00
Chris Loer
387fa1800f [ios, macos] Add "includesIdeographicGlyphs" option to MGLOfflineRegion. 2018-12-21 15:13:48 -08:00
Jason Wray
7cdbe6664a [ios, macos] Update for streets-v8 data and coalesced name fields in v11 styles 2018-12-07 21:46:46 -05:00
Jason Wray
46edc91656 [ios] Reorganize iosapp debug settings 2018-11-27 14:39:41 -05:00
Jason Wray
c7f9f1582f [ios] Add frame duration graph view to iosapp 2018-11-27 14:39:29 -05:00
Julian Rex
53bbf9d699 [ios] Added teardown of core objects when receiving UIApplicationWillTerminateNotification (#13367) 2018-11-20 14:31:09 -05:00
Jason Wray
ddcecdf7f7 [darwin] Rename variables to avoid shadow declarations
Per GCC_WARN_SHADOW.
2018-11-20 11:48:18 -05:00
Fabian Guerra Soto
c8fbcfd322 [ios, macos] Logging. (#13235)
* [ios, macos] Update the logging subsystem to platform agnostic.

* [ios, macos] Add coordinate to string function.

* [ios, macos] Add BOOL to string function.

* [ios, macos] Add tracing logs.

* [ios, macos] Add tracing logs to generated style classes.

* [ios, macos] Split logging categories accordingly to MGLLoggingLevel.

* [ios, macos] Log network requests.

* [ios, macos] Migrate NSAssert to MGLAssert.

* [ios, macos] Include MGLLoggingConfiguration to filesource-files.txt.

* [ios, macos] Fix logger string specifier for the line parameter.

* [ios, macos] Add logs to shapes classes.

* [ios, macos] Add logs to offline classes.

* [ios, macos] Add logs to annotation classes.

* [ios, macos] Add logs to foundation classes.

* [ios, macos] Fix snapshotter size logging.

* [macos] Add logs to map view.

* [ios, macos] Fix string from boolean prefix, add custom function for NSCAssert.

* Log size test

* [ios, macos] Add logging conditional compilation flag.

* [ios, macos] Rename function NSStringFromMGLTransition to MGLStringFromMGLTransition.

* [ios, macos] Remove verbose logging for release builds.

* [ios, macos] Rename NSStringFromCLLocationCoordinate2D to MGLStringFromCLLocationCoordinate2D.

* [ios, macos] Clean unnecesary blank lines in MGLLight.mm set methods.

* [ios, macos] Fix logging grammar, format, function names.

* [ios, macos] Remove compilation flag, rename flags.
2018-11-14 15:42:18 -08:00
Fabian Guerra
064d8b9aa8 Add a custom logging for the Mapbox Maps SDK for iOS. 2018-10-26 12:45:14 -07:00
Minh Nguyễn
6786ca6bf7 [ios, macos] Updated world tour locations 2018-10-08 13:47:22 -07:00
Fabian Guerra Soto
41dd886ce5 [ios, macos] Add Italian settings translations. (#12908)
* [ios, macos] Update transifex Root directory.

* [ios] Update Settings.bundle italian translation.
2018-10-02 09:36:08 -07:00
Minh Nguyễn
a030f1474f [ios, macos] Distinguish between viewing distance and altitude
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:] incorrectly treated the distance as an altitude. Due to backwards compatibility concerns, this method can’t be fixed in place. Instead, separate +[MGLMapCamera cameraLookingAtCenterCoordinate:correctlyFromDistance:pitch:heading:] and +[MGLMapCamera cameraLookingAtCenterCoordinate:altitude:pitch:heading:] methods have been added.
2018-10-01 18:12:03 -07:00
Nadia Barbosa
a991eec597 [ios] Remove Settings target; move Settings.bundle to iosapp
[ios] Remove copying of Settings.bundle from packaging script

[ios] Move Settings bundle under ios/app in file system

[ios] Copy bundle to iosapp in packaging script

[ios] Remove stranded Root.strings from SDK

[ios] Add English localization to example Settings.bundle
2018-09-19 14:16:22 -07:00
Jason Wray
511fca7210 [ios] Add fall-through single tap to iosapp 2018-02-07 16:53:33 -05:00
Jason Wray
790b9f5c82 [ios] Add experimental frame rate measurements to MGLMapView
Includes: average frame rate, average frame render duration, and instantaneous frame render duration.
2018-08-16 16:46:54 -04:00
Fabian Guerra Soto
681e0141de [ios] Mapbox's Location Manager new API. (#12013)
* [ios] The new location manager API provides two new protocols MGLLocationManager and MGLLocationManagerDelegate to handle the location cycle and updates respectively. This enables developers to chose the appropriate location provider according to their needs, or transition between outdoors/indoors location updates.

It does provide a default implementation based on CLLocationManager.
2018-07-20 14:14:43 -07:00
Jordan Kiley
673144786b [ios] updated predicates (#12178) 2018-06-19 16:53:10 -07:00
Jason Wray
e24930a036 [ios] Support safe area in iosapp
* [ios] Refactor iosapp two-map option; fix constraint

* It's NO in objc; enable second map scale bar
2018-06-08 23:13:12 -07:00
Julian Rex
9e4a16d7ee [ios] Updated MGLScaleBar to use rendered UIImages instead of MGLScaleBarLabel (#11921) 2018-05-24 10:29:56 -04:00
Fabian Guerra
30376f3ce1 Merge branch 'release-boba' into master
# Conflicts:
#	mapbox-gl-js
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/gradle/dependencies.gradle
#	platform/darwin/src/MGLVectorTileSource.mm
#	platform/darwin/src/MGLVectorTileSource_Private.h
#	platform/ios/CHANGELOG.md
#	src/mbgl/style/expression/compound_expression.cpp
2018-05-17 11:47:31 -04:00
Konstantin Käfer
f6da3ba9be iOS: Add custom layer example to debugging app (#7734) 2018-05-03 12:48:58 -07:00
Minh Nguyễn
ea59ba8209 [android, ios, macos] Added Korean localization 2018-05-02 12:57:14 -07:00
Jason Wray
c067865e7b [ios, macos] Update minimum deployment versions to iOS 9, macOS 10.11 (#11776)
* [ios] Remove iOS 8 conditionals

* [ios, macos] Bump pod deployment targets

* [ios, macos] Add changelog entries

* [ios, macos] Update docs

* Remove unnecessary selector-based version checks

* Update SQLite note

* [ios, macos] Replace lightweight generics macros with direct use
   Lightweight generics for Foundation collections are available everywhere with the bump to iOS 9 and macOS 10.11.

* Update deprecated macOS method
2018-04-27 12:25:49 -04:00
Julian Rex
2e22593962 [ios] Mark -presentCalloutFromRect:inView:constrainedToView:animated: unavailable (#11738) 2018-04-19 15:47:58 -04:00
Fabian Guerra Soto
cec46070c6 [ios, macos] Add NSExpression convenience constructors and helper methods. (#11278)
* [ios, macos] Refactor convinience expression initializers.

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h
#	platform/darwin/src/NSExpression+MGLAdditions.mm
#	platform/ios/app/MBXViewController.m

* [ios, macos] Add MGL_MATCH convenience method.

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h
#	platform/darwin/src/NSExpression+MGLAdditions.mm
#	platform/darwin/test/MGLExpressionTests.mm

* [ios, macos] Add Swift friendly convenience methods name syntax..

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h

* [ios, macos] Update runtime styling examples.

# Conflicts:
#	platform/ios/app/MBXViewController.m

* [ios, macos] Add NSExpression variable expressions properties.

* [ios, macos] Clarify convenience initializer names.

* [ios, macos] Update Style Authors guides.

* [ios, macos] Fix cherry-pick merge.

* [ios, macos] Update convenience initializers documentation.
2018-04-16 20:48:04 -04:00
Minh Nguyễn
ecc43c871a [android, ios, macos] Added European Portuguese localization 2018-04-16 17:26:44 -07:00
Minh Nguyễn
e16ce7d879 Localize expressions more thoroughly (#11651)
* [ios] Removed changelog entry for Terrarium

The broader feature is new to v4.0.0 as well.

* [ios, macos] Localize expressions more thoroughly

Replaced the MGLStyle.localizesLabels property with a -localizeLabelsIntoLocale: method that allows the caller to specify the locale to localize into. Also exposed a per-expression localization method for developers who want to vary behavior from layer to layer.

* [macos] Offer English labels if preferred language is unsupported

* [ios, macos] Removed dead code

* [ios] Use new localization method in iosapp

* [ios, macos] Fixed local name labels

* [ios, macos] Convert tokens to key path expressions in stop dictionaries

* [ios, macos] Streamlined token upgrading

Separated token upgrading into a separate process that only happens as part of the MGLSymbolStyleLayer.text and MGLSymbolStyleLayer.iconImageName properties’ getters, so that it’s easy to remove later when mbgl changes obviate this workaround. Removed the replacesTokens parameter to the expression localization methods.

* [ios, macos] Preserve whitespace between tokens

* [ios, macos] Moved token replacement to a consistent category

Fixed a build warning.

* [ios, macos] Replace tokens in all string-typed getters

For consistency, replace tokens with key paths in all string-typed style paint and layout properties.

* [ios, macos] Test token replacement

Added tests for replacement of tokens with key paths in expressions. Fixed token replacement for raw strings in stop dictionaries. Avoid sticking a single string inside an mgl_join: call.

* [ios, macos] Test token replacement, localization

Added unit tests of token replacement and localization of expressions. Only NSExpression is responsible for resolving the preferred language now, since NSLocale tends to tack a region code onto the locale identifier and the NSExpression method can be called independently anyways. Added a private variation of +[MGLVectorTileSource preferredMapboxStreetsLanguage] that takes an array of preferred languages. Fixed localization of non-expressions in stop dictionaries.

* [ios, macos] Dictionary keys aren’t necessarily zoom levels
2018-04-16 15:24:33 -07:00
Jason Wray
be3fc4413a [ios] Change MGLAnnotationView.scalesWithViewingDistance default value to NO 2018-04-12 16:49:30 -04:00
Minh Nguyễn
a877b6dbe8 [ios, macos] Renamed MGLVectorSource to MGLVectorTileSource 2018-04-02 10:42:54 -07:00
Minh Nguyễn
29a8efab26 [ios, macos] Renamed MGLRasterSource to MGLRasterTileSource
Also updated various source class listings to reflect the addition of image and raster DEM sources.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
8c5eb6ca9c Install aftermarket expression functions (#11472)
* [ios, macos] Introduced more ergonomic expression concatenation syntax

* [ios, macos] Fixed mgl_join:

* [ios, macos] Simplified expression document headings

* [ios, macos] Documented mgl_join:

* [ios, macos] Convert length operator to length: for strings

Only works for literal strings.

* [ios, macos] Implemented type conversion using CAST()

* [ios, macos] Aftermarket let expressions

* [ios, macos] Refactored aftermarket expression functions

Refactored the installation of aftermarket expression functions to use macros. It is no longer necessary to handwrite the type encoding of a function. Also added aftermarket functions for interpolating and stepping.

* [ios, macos] Updated documentation, tests, demo apps

* [ios, macos] Added generic expression function

* [ios, macos] Add MGL_MATCH function placeholder.

* [ios, macos] Add MGL_SWITCH expression operator.

* [ios, macos] Add mgl_coalesce: as expression function.

* [ios, macos] Update style documentation.

* [ios, macos] Add conventional custom function support.

* [ios, macos] Updated example code

* [ios, macos] Add mgl_coalesce conventional custom function support.

* [ios, macos] Add aftermarket function to 'has' operator.

* [ios, macos] Add documentation for lookup and feature operators.

* [ios, macos] Documented simple lookup

* [ios, macos] Renamed, reversed has expression

Renamed mgl_hasProperty:properties: to mgl_does:have: for better readability and consistency with the conventional mgl_has: function. Documented both forms of mgl_has:.

* [ios, macos] Restored OEM conditionals where available

This is the preferred syntax for simple conditionals on iOS 9 and above, because you can inline the predicate instead of wrapping it in a constant value expression, which means you can write a conditional in a single format string.

* [ios, macos] Update style docs.

Co-authored-by: Fabian Guerra <fabian.guerra@mapbox.com>
2018-03-29 10:25:05 -07:00
Julian Rex
d4f2bc07ca [ios,macos] Selecting offscreen annotation pans map to fit annotation & callout view (#3249, #9790) 2018-03-21 13:51:10 -04:00
Jason Wray
4acd671a65 [ios] Add camera limit debug option to iosapp
Adapted from cdff47276d/Examples/ObjectiveC/BlockingGesturesDelegateExample.m
2018-03-14 15:46:43 -04:00
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
Jordan Kiley
db0f6377fc Fixed DDS polygon example (#11286)
* [ios] Updated expression

* [ios] Removed centering code
2018-02-23 22:19:51 -08:00
Jordan Kiley
9459cf6a91 [ios, macos] Mark deprecated methods as unavailable (#11205)
Fixes #10735
2018-02-16 16:20:08 -08: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
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
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
e6d6a231e8 [ios, macos] Added Danish localization 2018-02-07 02:34:29 -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
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