Commit Graph

226 Commits

Author SHA1 Message Date
Minh Nguyễn
26e1c925f2 [ios, macos] Expose MGLMapView OpenGL context to OpenGL style layers
Added a property to MGLOpenGLStyleLayer that contains the map view’s underlying OpenGL rendering context.
2019-02-25 10:44:43 -08:00
Fabian Guerra Soto
1fc7a9b82e [ios, macos] Expose the url session configuration object. (#13886)
The `MGLNetworkConfiguration` class was make public, and added `sessionConfiguration` property to let developers customize the `NSURLSessionConfiguration` object that is used to make HTTP requests in the SDK.
2019-02-18 13:16:20 -08:00
Fabian Guerra Soto
ca129e0c79 [ios, macos] MGLMapView logging improvements. (#13776)
Added NSEdgeInsets to NSString function to improve the debugging on macOS.
Added debug logs to MGLMapView.
2019-01-22 15:42:28 -08:00
Julian Rex
b460efdf00 [ios] Partially offscreen annotations (without callouts) are no longer moved on-screen (#13727) 2019-01-22 17:45:06 -05:00
Julian Rex
49ee543e72 [macos] Fixes MGLMapView.visibleAnnotations (#13745) 2019-01-16 17:31:59 -05:00
Julian Rex
c8c664fbf3 [ios, macos] Support getLeaves (and related) clustering methods (#12952) following feature extension API (#13382) 2019-01-14 15:17:13 -05:00
Julian Rex
53e20430c8 [ios, macos] Fixes a bug where the animated parameter of -[MGLMapView selectAnnotation:animated:] was ignored. (#13689) 2019-01-09 13:07:00 -05:00
Julian Rex
76b3bb9d20 [ios, macos] Added missing mapViewDidBecomeIdle for iOS. Fixed typo. (#13666) 2019-01-04 09:15:59 -05:00
Chris Loer
662a495561 [docs] EnterIdle -> BecomeIdle 2018-12-11 11:46:16 -08:00
Chris Loer
70c2d5a4ca [core, darwin, android] Add onDidEnterIdle to MapObserver.
didEnterIdle fires whenever render completes and no repaint is scheduled.
2018-12-11 11:46:16 -08:00
Minh Nguyễn
425a3ade9e [ios, macos] Harmonize bundle identifiers
For consistency with each other and with their product name and module name, the iOS and macOS map SDKs now have a bundle identifier of com.mapbox.Mapbox, whether in the form of a static or dynamic framework. The logging subsystem identifier has also been changed to match.
2018-11-15 22:00:30 -08: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
Bruno de Oliveira Abinader
bf8b24fa8d [build] Update to geometry v1.0.0 2018-11-13 17:28:26 +02:00
Minh Nguyễn
89cf6c6006 [macos] Removed redundant sign flip
Fixed an issue where the mbgl::CameraOptions’ heading was misinterpreted as going counterclockwise instead of clockwise.
2018-10-30 14:05:07 -07:00
Minh Nguyễn
8c15911717 [ios, macos] Removed extraneous radian-degree conversions 2018-10-26 16:25:29 -07: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
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
Fabian Guerra Soto
57837443bb [ios, macos] Add crossSourceCollissions property. (#12941)
* [ios, macos] Add crossSourceCollissions property.

* [ios, macos] Add perSourceCollisions property.

* [ios, macos] Update changelogs.
2018-09-26 15:17:30 -07:00
Nadia Barbosa
7017ac512e [ios, macos] Allow -convertCoordinateBounds to span antimeridian 2018-09-04 18:57:18 -07:00
Jordan Kiley
7fc872b797 Add enabled property to MGLShape (#12352)
* [ios, macos] Add -[MGLMapViewDelegate mapView:canSelectAnnotation:] method.

* [ios, macos] Update changelogs.

* [ios, macos] Add mapView:canSelect: integration tests.

* [ios, macos] Change semantics to shape annotations.

* [ios, macos] Update changelogs.

* [ios, macos] Update shapeAnnotationIsEnabled documentation, improve code readability.
2018-08-20 16:30:03 -07:00
Ivo van Dongen
ca0f2f925d [darwin] arbitrary offline region geometries 2018-08-20 22:49:01 +03:00
Minh Nguyễn
2424582ee3 [macos] Canonicalized another exception name 2018-08-15 09:57:28 -07:00
Bobby Sudekum
4286d5869c Add pitch argument to cameraThatFits functions (#12213) 2018-07-02 16:30:18 -07: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
Fabian Guerra Soto
a425995189 [ios, macos] Add to-rgba expression operator. (#11725)
* [ios, macos] Add expression support to to-rgba operator.

* [ios, macos] Update style docs.

* [ios, macos] Refactored to-rgba to to-color.

* [ios, macos] Add support for to-rgba expression operator.

* [ios, macos] Add multiple parameters support to to-color operand.

* [ios, macos] Enable to-rgba operator for MGLColor or key path expressions.

* [ios, macos] Update predicates and expressions guide to reflect cast changes.

* [ios, macos] Update changelogs.

* [ios, macos] Clarify color casting usage.
2018-05-07 12:01:29 -04:00
Fabian Guerra Soto
a365dd11da [ios, macos] Make NSPredicate+MGLAdditions public. (#11810) 2018-05-04 15:09:07 -04: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
5b5549d644 [ios, macos] Fix for camera movement when selecting visible annotations (#11731) 2018-04-24 11:01:04 -04:00
Minh Nguyễn
9faed7293b [ios, macos] Eliminated MGLAbstractShapeSource
MGLComputedShapeSource is now a direct subclass of MGLSource and sibling of MGLShapeSource.
2018-04-02 10:42:54 -07: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
59e92904c3 Eviscerate mbgl expression to Foundation JSON object conversion (#11389)
* [ios, macos] Eviscerate mbgl expression to Foundation JSON object conversion

* [ios, macos] Remove literal special case

MGLJSONObjectFromMBGLValue() is just a literal translation from C++ types to Foundation types; no need for expression-specific literal wrapping.

* [ios, macos] Implemented RGB(A) operators

* [ios, macos] More robust color conversion

* [macos] Create calibrated RGB from expression on Sierra

* [macos] Calibrate colors in expressions at runtime

* [ios, macos] Special-case number conversion without fallbacks

* [ios, macos] Test mgl_number expressions

* [ios, macos] Updated tests for aftermarket expressions

* [ios, macos] Relax roundtripping requirement for serialize()

* [ios, macos] Fixed interpolation expression tests

* [ios, macos] Removed dead code

* [ios, macos] Fixed color conversion on Sierra
2018-03-30 16:43:55 -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
Lloyd Sheng
4404a2669b [ios, macos] Fix an issue where a wrong annotation may selected if annotations were set close together (#11438)
* [ios] Fix an issue where wrong annotation may selected when annotations very close #10734

* [macos] Fix an issue where a wrong annotation may selected if annotations were set close together

* update the iOS change log and the macOS change log

* Fix an issue where the comment referenced to the wrong variable name
2018-03-13 11:26:15 -07:00
Minh Nguyễn
6c0599b536 [macos] Assume sRGB for mbgl expressions, CSS in attribution
Assume mbgl needs colors in the sRGB color space rather than the calibrated RGB color space. Fixed link colors when creating attribution from HTML.
2018-03-07 17:31:01 -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
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
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
Fabian Guerra
187b6dc31c Merge branch 'release-agua' into master
# Conflicts:
#	circle.yml
#	cmake/core-files.cmake
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/build.gradle
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/CameraChangeDispatcher.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/text/LocalGlyphRasterizer.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/BitmapUtils.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DebugModeActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/LocalGlyphActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationTintActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_local_glyph.xml
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml
#	platform/darwin/src/MGLMapSnapshotter.mm
#	platform/darwin/src/MGLRendererConfiguration.h
#	platform/ios/CHANGELOG.md
#	platform/ios/DEVELOPING.md
#	platform/ios/INSTALL.md
#	platform/ios/README.md
#	platform/ios/resources/bg.lproj/Localizable.strings
#	platform/ios/resources/es.lproj/Localizable.strings
#	platform/ios/resources/vi.lproj/Localizable.strings
#	platform/ios/src/MGLMapView.mm
#	platform/macos/macos.xcodeproj/project.pbxproj
#	src/mbgl/text/glyph_manager.cpp
2018-01-04 12:55:19 -06:00
Andrew Kitchen
38bffda85a [darwin, macos] Rename Info.plist key for consistency
Also removes related dead code in macos MGLMapView.mm
2018-01-03 11:37:53 -06:00
Andrew Kitchen
314c51611c [darwin, ios, macos] Introduces an MGLRendererConfiguration class
Instructions for enabling client-side rendering of CJK glyphs live in
this header, and this class provides the rest of the values needed for
instantiating the renderer on iOS and macOS.
2018-01-03 11:37:53 -06:00
Andrew Kitchen
c1705f37fb [ios, macos] Adds support for specifying an ideographic font family name
Adding a MGLIdeographicFontFamilyName to the containing app's Info.plist
will result in CJK glyphs being rasterized on demand (#10522)
2018-01-03 11:37:53 -06:00
Chris Loer
0dc00ad877 [ios,macos] Darwin implementation of a CoreText-based LocalGlyphRasterizer.
- Changing font weight does not currently appear to be working.
 - Glyph metric extraction code not working; currently unused.
2018-01-03 11:37:53 -06:00
Fabian Guerra
b09311656d [macos] Update visible coordinates documentation to reflect antimeridian usage. 2017-12-21 20:39:26 -06:00
Andrew Kitchen
4418edbfcd [darwin, macos] Rename Info.plist key for consistency
Also removes related dead code in macos MGLMapView.mm
2017-12-11 10:43:00 -08:00
Andrew Kitchen
b2f06677a7 [darwin, ios, macos] Introduces an MGLRendererConfiguration class
Instructions for enabling client-side rendering of CJK glyphs live in
this header, and this class provides the rest of the values needed for
instantiating the renderer on iOS and macOS.
2017-12-11 10:43:00 -08:00
Andrew Kitchen
3713102005 [ios, macos] Adds support for specifying an ideographic font family name
Adding a MGLIdeographicFontFamilyName to the containing app's Info.plist
will result in CJK glyphs being rasterized on demand (#10522)
2017-12-11 10:43:00 -08:00
Chris Loer
cb380064bb [ios,macos] Darwin implementation of a CoreText-based LocalGlyphRasterizer.
- Changing font weight does not currently appear to be working.
 - Glyph metric extraction code not working; currently unused.
2017-12-11 10:43:00 -08:00
Minh Nguyễn
5086c76997 [macos] Fixed logo view distortion on macOS High Sierra
Only the logo view’s baseline is aligned to the attribution view’s baseline; the X-height doesn’t need to be aligned. Previously, macOS ignored the X-height constraint inferred from the alignment rect, but now it honors it in addition to the baseline.
2017-11-30 17:11:34 -08:00