Commit Graph

834 Commits

Author SHA1 Message Date
Minh Nguyễn
9e53135fca [ios, macos] Added Info.plist key to customize offline database path 2020-05-06 10:45:02 -07:00
Minh Nguyễn
ecfe9bdd98 [ios, macos] Made offline database path public
Added getters for the path and URL of the offline database file and made use of the getter in places where the code had previously called -cacheURLIncludingSubdirectory: (which technically could’ve returned a different path each time it was called).

Also reformatted some MGLOfflineStorage documentation comments.
2020-05-06 10:45:02 -07:00
Minh Nguyễn
27eee6adf5 [ios, macos] Added distance expression function
Installed an mgl_distanceFrom: aftermarket expression function that corresponds to the “distance” expression operator in style JSON.
2020-05-01 12:40:16 -07:00
Minh Nguyễn
1b4c422c5c [ios, macos] Added offline pack context setter
Set the offline pack’s associated metadata, then replace the offline pack’s underlying offline region based on a fresh reload, without touching the master array of offline packs.
2020-04-30 16:34:41 -07:00
Minh Nguyễn
bf91ad4994 [ios, macos] Customizing Fonts guide
Split out a guide about customizing fonts, covering both server-side and client-side fonts.
2020-04-30 16:34:19 -07:00
Minh Nguyễn
50d067f4ad [ios, macos] Allow specifying multiple fonts or font families for local font rendering
Removed MGLIdeographicFontFamilyName validation from MGLRendererConfiguration, since mbgl::LocalGlyphRasterizer performs more robust validation. Removed C++ from MGLRendererConfiguration interface, implementation, and tests for simplicity.

Pass all the specified font and font family names into mbgl so that mbgl::LocalGlyphRasterizer can form a full font cascade list.
2020-04-24 18:31:29 -07:00
Minh Nguyễn
152d372b61 mbgl v1.6.0-rc.2 2020-04-24 18:25:31 -07:00
Minh Nguyễn
f3da2d7053 [ios, macos] Only set snapshotter camera options if camera is valid 2020-04-24 10:41:07 -07:00
Nishant Karajgikar
6c764cbe31 Fixing issue where UIColor with alpha < 1 was being rendered incorrectly (#266)
* Expose new method to get color for pre-multiplied alpha

* Call new method to get pre-multiplied color values

* Fix tests

* Apply fix for macOS

* Update changelogs

* Rever submodule changes

* Add test

* Review comment

* Update platform/ios/CHANGELOG.md

Co-Authored-By: Minh Nguyễn <mxn@1ec5.org>

* Update platform/macos/CHANGELOG.md

Co-Authored-By: Minh Nguyễn <mxn@1ec5.org>

Co-authored-by: Minh Nguyễn <mxn@1ec5.org>
2020-04-21 10:04:13 -04:00
Minh Nguyễn
64f0a54d7f [ios, macos] Initialize offline storage on main thread before snapshotting 2020-04-07 12:00:36 -07:00
Julian Rex
171ff9484a Adds delegate to MGLNetworkConfiguration (#228) 2020-03-27 10:28:21 -04:00
Julian Rex
be6574d0df Updates gl-native submodule to 1.5.0 release (#242) 2020-03-26 19:18:34 -04:00
Minh Nguyễn
63bf91125a [ios, macos] Snapshotter (runtime styling) delegates
Added a protocol and property for MGLMapSnapshotter’s delegate, which it uses for runtime styling. Generalized MGLStyle to be usable in the absence of MGLMapView. Moved MGLOpenGLStyleLayer code around to compile.
2020-03-26 15:29:33 -07:00
Minh Nguyễn
180ab72055 [macos] Call overlay handler when snapshotting 2020-03-26 15:29:33 -07:00
Minh Nguyễn
5196e37d48 [ios, macos] Convert NSDictionary to GeoJSON 2020-03-17 02:14:03 -07:00
Minh Nguyễn
93f5290c0e [ios, macos] SELF IN MGLShape expressions
Added support for the expression syntax “SELF IN shape” or “shape CONTAINS SELF”, which is interpreted as a “within” expression in JSON format.
2020-03-17 02:13:53 -07:00
Minh Nguyễn
957296b2fb [ios, macos] Convert geometries to shapes, not features
Fixed an issue where GeoJSON geometries were converted to MGLFeature instances instead of MGLShape objects.
2020-03-17 01:48:28 -07:00
Minh Nguyễn
fb559ea8d4 [ios, macos] Aggregate equality predicates
Added support for “ANY … =” and “ALL … !=” as synonyms for “IN” and “NOT IN”, respectively.
2020-03-17 01:47:49 -07:00
Minh Nguyễn
bc6f434a88 [ios, macos] Removed in expression workaround
Removed the match-based in expression workaround in favor of real support for an in expression operator. Avoid interpreting “literal IN literal” predicates as legacy filters.
2020-03-17 01:46:22 -07:00
Minh Nguyễn
3318a0a383 [ios, macos] Keep MGLMapSnapshotter alive through completion 2020-03-16 18:17:08 -07:00
Minh Nguyễn
d357f8c511 [ios, macos] Clarify threading in snapshotter documentation 2020-03-16 18:13:58 -07:00
Minh Nguyễn
8148cb7ff9 [ios, macos] Document changes to snapshotter memory management 2020-03-16 18:13:58 -07:00
Minh Nguyễn
8998f7a314 [ios, macos] Documented performance and caching improvements in mbgl v1.4.0 2020-03-16 18:13:58 -07:00
Minh Nguyễn
98e8af96d3 [ios, macos] Streamlined MGLMapSnapshotter
Upgraded MGLMapSnapshotter to be compatible with the latest mbgl.

Converted as many of MGLMapSnapshotter’s instance variables and properties as possible into local variables close to the point of use. The completion handler of -startWithCompletionHandler: and its variants is no longer called as part of -cancel, when the snapshotter is deallocated, or when the application is terminating. -loading once again works and is used to avoid concurrent requests, now that the completion handler is no longer memoized. Snapshotter options are copied and converted into a snapshotter on demand as late as possible.

Made the decoration step synchronous while continuing to perform it on a worker thread. Only access self on user-facing queues. Ensure MGLMapSnapshotter.loading is reset after snapshotting.

Pushed some drawing and completion code up from inner completion blocks to outer completion blocks to avoid excessively passing state around. Converted a few class methods into standalone C functions to emphasize the avoidance of captured state.
2020-03-16 18:13:42 -07:00
Minh Nguyễn
5be63a0d4a [ios, macos] Updated MGLSymbolStyleLayer.symbolSortKey documentation 2020-03-16 17:59:35 -07:00
Alexander Shalamov
8b12c6b305 Add async completion handler to MGLOfflineStorage::preloadData (#188)
* Add async completion handler to preloadData

* Update unit tests

* Update changelogs for iOS and macOS
2020-03-16 10:20:02 +02:00
Minh Nguyễn
9c4b5ee557 [ios, macos] Nine-part resizable images
The MGLSymbolStyleLayer.iconTextFit property now respects the cap insets of any nine-part stretchable image passed into the -[MGLStyle setImage:forName:] method.

The “Manipulate Style” command in macosapp demonstrates the stretchable image feature by adding a single Ohio state route shield image, which has cap insets defined in the asset catalog, and labeling each Ohio state route with that image, stretched to fit the route number without widening the icon’s stroke.
2020-03-11 16:55:18 -07:00
Minh Nguyễn
2f8059af15 [ios, macos] Customized symbolAvoidsEdges documentation
No one using the iOS or macOS map SDK will know whether it supports “global collision detection” based on “GL JS v0.42.0 or greater”.
2020-02-28 11:45:14 -08:00
Minh Nguyễn
5b4fb6c216 mapbox-gl-native v1.3.0 2020-02-28 11:45:09 -08:00
Minh Nguyễn
e403a069f0 [ios, macos] Added sort key properties 2020-02-26 12:24:21 -08:00
Minh Nguyễn
df8a934376 [ios, macos] Streets tiles can contain Traditional Chinese, Vietnamese 2020-02-21 10:59:56 -08:00
Julian Rex
ca85ea2b28 Add private property to determine whether the snapshotter logo is displayed. (#159) 2020-02-11 15:11:36 -05:00
Julian Rex
e62a7cade3 Updates mapbox-gl-native submodule to release-unicorn branch (#151)
* Update submodule

* [ios] Ignore patches

* Use new FileSourceManager interface

* Remove filesource-files.json

* Update submodule

* Remove http_file_source.mm from this repo for clarity.

* Adds set of MGLNativeNetworkManager (via MGLMapView and MGLOfflineStorage); includes tests.

* - Create testing methods, so that we don't need to export MGLNativeNetworkManager in GL
- Singleton accessors now set the delegate with each call; tests modified accordingly.

* Add test for expected properties

* [ios] Update MGLResourceTests for SKU changes

Co-authored-by: Alexander Shalamov <alexander.shalamov@mapbox.com>
Co-authored-by: Jordan Kiley <jmkiley@users.noreply.github.com>
2020-01-22 15:09:18 -08:00
Nadia Barbosa
87ada1e735 Preparations for ios-v5.7.0-alpha.1 (#139)
* Podspec & changelog updates for 5.7.0-alpha.1

* Bump to mapbox-gl-native/d3a5ed

* Add files from #16031 (#140)

* [ios] Add changed files

* [ios] Add files to project

* [ios] Bumped submodule

* Bump vendor/mapbox-gl-native to master again

Co-authored-by: Jordan Kiley <jmkiley@users.noreply.github.com>
2020-01-10 11:05:11 -08:00
Alex Chugunov
2ee77ffc85 Use copy attribute instead of assign on accessToken property (#128) 2020-01-03 15:15:15 -05:00
Fabian Guerra Soto
2cff65d3ea Podspec / submodule updates for 5.6.0-beta.1, adapt to gl-native immutable GeoJSON sources (V2) (#103)
* Podspec updates for 5.6.0-beta.1

* Bump gl-native submodule to release-tequila

* adapt to mapbox/mapbox-gl-native#15989 (#102)

* More changelog/install updates

* Fix telem dependency docs

* More clarifying documentation

* Fix typo
2019-12-13 16:04:05 -08:00
Julian Rex
5e31b8fc36 Integrate Telemetry SDK as framework dependency (#60) 2019-11-25 17:44:36 -05:00
Jordan Kiley
04547cfba0 Update changelog and mapbox-gl-native submodule (#67) 2019-11-23 08:25:16 -05:00
Julian Rex
a23fa5152e Update to mapbox-gl-native sangria (#41) 2019-10-29 16:56:18 -04:00
Jordan Kiley
e4e2a78033 Add iOS bindings for cluster properties (#15515) 2019-10-11 13:46:41 -07:00
Julian Rex
a1f124c394 [ios] Fix for iOS 9 crash (seen in simulator) (#15771)
* [ios] Fix for iOS 9 crash (seen in simulator)

* [ios] Update change log

* [ios, macos] Add #if around new function.
2019-10-11 15:16:12 -04:00
Julian Rex
a90e5f6e97 [ios, macos] Changed exception to assert and nil return, since attribution methods can be called via user interaction (without a mechanism to try/catch) (#15764) 2019-10-05 13:06:28 -04:00
Julian Rex
33a70100b8 [ios] Adds pointForCoordinate/coordinateForPoint to MGLMapSnapshotOverlay (#15746)
* [ios] Adds `pointForCoordinate:`/`coordinateForPoint:` to MGLMapSnapshotOverlay

* [ios] Adds PR #

* [ios, macos] Update file lists & mac contexts

* [macos] Fix for image scale in overlay.

* [ios] Updated change log based on PR feedback.
2019-10-04 13:51:40 -04:00
Alexander Shalamov
e5cdc4ecf3 [core][android][darwin] Move number format to i18n 2019-09-26 10:55:47 +03:00
Alexander Shalamov
9c8295c6a6 [core][android][darwin] Move platform specific Collator impls from expression
Platform specific Collator implementations should not be part of an expression APIs.
2019-09-26 10:55:47 +03:00
Thiago Marcos P. Santos
c7bbd5bbef [core] Fix performance-move-const-arg 2019-09-25 18:59:07 +03:00
m-stephen
8128d709b6 [ios]Add errors reporting (#15391)
* add errors reporting

* [ios] report error if rendering takes > 1 second. (#15633)
2019-09-20 10:14:44 +08:00
Julian Rex
2b08c1d7bf [ios, macos] Fix MGLOfflinePack invalidate crash (#15582) 2019-09-18 18:13:07 -04:00
Julian Rex
8805defe57 [ios, macos] (Re)add tilesize rounding. (#15656) 2019-09-18 11:52:15 -04:00
Julian Rex
a6618dc0f9 [ios] Speculative fix for failing test: MGLDocumentationExampleTests.testMGLHillshadeStyleLayer() 2019-09-18 16:21:59 +03:00