Commit Graph

480 Commits

Author SHA1 Message Date
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
Chris Loer
1661af1cb4 [core] Enable local glyph generation using TinySDF.
- Platform-specific LocalGlyphRasterizer is responsible for deciding which glyphs to rasterize locally and for implementing the rasterization.
 - Default platform implementation doesn't locally generate any glyphs -> no behavior change
 - Unit test uses StubLocalGlyphRasterizer, which returns a single fixed bitmap for all CJK glyphs
 - Rename glyph_loader.test to glyph_manager.test
2017-12-11 10:43:00 -08:00
Jason Wray
4f31b07d09 [macos] Add Info.plist version keys 2017-12-07 19:01:12 -05:00
Jordan Kiley
8f3cc3dbc4 [ios, macos] Rename the iOS and macOS SDKs (#10610) 2017-12-04 16:40:14 -08:00
Konstantin Käfer
8757164ac8 [build] standardize on -fvisibility=hidden for all targets
Enables -fvisibility=hidden for iOS and Linux, and adds a workaround for GCC 6.3-7.1
Adds a GCC 6 build
Enables diagnostics for C files
Fixes a shadow warning in parsedate.c
2017-11-29 17:31:33 +01:00
Konstantin Käfer
2eec5a1980 [core] move HeadlessBackend extension initialization code into Impl 2017-11-29 15:48:51 +01:00
Konstantin Käfer
335f04f7e1 [core] fold HeadlessDisplay into the headless RenderBackend implementation 2017-11-29 15:48:51 +01:00
Andrew Kitchen
a2817ff5ed [darwin, macos, ios] Renames CGImage creation function to imply +1 retain count (#10570) 2017-11-27 16:47:58 -08:00
Jesse Crocker
7c6ede6bb3 [ios,macos] Add MGLComputedShapeSource example to demo apps 2017-11-22 13:56:38 -08:00
Asheem Mamoowala
246417ef24 [ios, macos] Implement MGLComputedShapeSource binding for CustomGeometrySource 2017-11-22 13:56:38 -08:00
Jesse Crocker
b2925e71ac [darwin] Abstract ShapeSource interface 2017-11-22 13:56:38 -08:00
Minh Nguyễn
465b345dd2 [ios, macos] Updated changelogs 2017-11-10 11:25:40 -08:00
Tobrun
225fba8a0a Merge branch 'release-agua' into tvn-merge-release 2017-11-10 06:16:35 +01:00
Minh Nguyễn
2955fb594c Make places and roads accessible to VoiceOver (#9950)
* [ios] Summarize places, roads after zooming with VoiceOver

After zooming, MGLMapView’s accessibility value now indicates the number of visible roads and lists out a few places visible in the current viewport, starting with the features at the highest z-index (not necessarily the largest or the closest to the center of the view). Avoid saying that no annotations are visible.

* [ios] Allow VoiceOver to navigate among place features

Split out a separate header for the various accessibility elements tied to MGLMapView. Wrap place features in accessibility elements and insert them into the narration order after the visible annotations but before the attribution button. Refactored MGLMapView’s accessibility code to rely on ranges to avoid off-by-one errors.

* [ios] Post layout change notification when fully rendered

Post a layout change notification when fully finishing a map render.

* [ios, macos] Moved MGLVectorSource+MGLAdditions to more specific group

* [ios] Localize accessibility feature names

* [ios] Find place feature accessibility elements by identifier

* [ios] Refactored accessibility traits

Also created a new MGLPlaceFeatureAccessibilityElement class.

* [ios] Sort accessibility elements by screen distance from center

Sort annotation accessibility elements by screen distance, not the hypotenuse of coordinates, which can yield incorrect results when the map is rotated or tilted or when the user is located at high latitudes. Sort place feature accessibility elements by screen distance as well.

* [ios] Create a place feature accessibility element, not an abstract feature accessibility element

* [ios] Only query for visible place features once per camera

Improved accessibility performance after changing the map camera. MGLMapView no longer queries the map for place features once per place feature.

* [ios] Made roads accessible

Wrap visible road features in accessibility elements described by the road name, route number, and general direction of travel.

* [ios] Cleaned up radian conversions

* [ios] Thickened road accessibility elements

* [ios] Made unioned roads accessible

* [ios] Consistently sort accessibility elements

Also fixed an issue causing road feature accessibility elements to get treated like place feature accessibility elements.

* [ios] Announce direction of divided roads

Announce the direction of a divided road based on the direction of its first polyline.

* [ios] Refined announced elevation units

* [ios] Romanize feature names

* [ios] Updated changelog

* [ios] Delay zoom announcement

A 100-millisecond delay is enough for the post-zooming announcement to reflect the new zoom level rather than the previous zoom level.

* [ios] Consolidated geometry functions

Adopted MGLGeometry_Private.h in the accessibility code, forcing a conversion to Objective-C++. Avoid inlining some of the more complex geometric functions.

* [ios] Fixed feature name romanization in accessibility labels

NSLocale.scriptCode is only set when the locale identifier explicitly specifies a script. Use NSOrthography to identify the dominant orthography regardless of locale.

Also added a unit test of feature accessibility element labels.

* [ios] Added tests for place, road accessibility values

* [ios] Announce one-way roads

A road feature’s accessibility value now indicates whether the road is a one-way road.
2017-11-03 12:17:45 -07:00
Ivo van Dongen
de9098cf99 [darwin][ios][macos] map snapshotter - add MGLMapSnapshot wrapper 2017-11-01 09:23:53 -04:00
Fabian Guerra Soto
63f7963a93 [ios, macos] Center shape annotation's callout when offscreen. (#10255)
* [ios, macos] Center annotation's anchor to tap point when coordinate center is offscreen.

* [ios, macos] Update changelogs.
2017-11-01 08:20:48 -04:00
Ivo van Dongen
3cdb249c70 [darwin][ios][macos] map snapshotter - add MGLMapSnapshot wrapper 2017-10-31 19:52:08 +02:00
Minh Nguyễn
72a6eb8b5c [android, ios, macos] Added Hungarian localization
Added a Hungarian localization to the Android SDK. Updated the iOS and macOS SDK Hungarian localization.
2017-10-27 22:23:02 -07:00
Minh Nguyễn
edf399f1b7 [android, ios, macos] Added Bulgarian localization 2017-10-27 22:23:02 -07:00
Minh Nguyễn
ec4e8899b7 [ios, macos] Updated Brazilian Portuguese localization 2017-10-27 22:23:02 -07:00
Fabian Guerra Soto
372698aa23 [ios, macos] Iterate over point and shape annotations. (#10262) 2017-10-27 10:24:12 -04:00
Jason Wray
1c78d14a20 [build] Disable iOS and macOS builds on Bitrise 2017-10-25 12:48:25 -04:00
Thiago Marcos P. Santos
9d87dc8cf1 [core] Make the OpenGL implementation platform specific
Split the headers, so each platform includes the most appropriated
header.
2017-10-25 18:08:28 +03:00
Fabian Guerra Soto
b7b8baef9d [ios, macos] Add selection support to MGLMultiPoint annotations. (#9984)
* [ios, macos] Add selection support to MGLMultiPoint annotations.

* [ios, macos] Update changelogs.
2017-10-18 15:18:54 -04:00
Asheem Mamoowala
98a47884f0 [ios, macos] Use CLLocationDirection for direction parameter in -[MGLMapView cameraThatFitsShape:shape direction: edgePadding:] 2017-10-09 17:12:27 -07:00
Asheem Mamoowala
24bd336b88 [android][ios][macOS] Implement bindings for Map::cameraForGeometry. On macOS, also added -[MGLMapView setCamera: withDuration: animationTimingFunction: edgePadding: completionHandler:] for parity with iOS 2017-10-09 13:58:11 -07:00
Asheem Mamoowala
9e79659007 [android][ios][macOS] Implement bindings for Map::cameraForGeometry. On macOS, also added -[MGLMapView setCamera: withDuration: animationTimingFunction: edgePadding: completionHandler:] for parity with iOS 2017-10-09 11:42:37 -07:00
Fabian Guerra Soto
f01588cac7 [ios, macos] Improve snap shotter documentation. (#10020)
* [ios, macos] Improve snap shotter documentation.

* [macos] Save snapshots in correct format

* [macos] Renamed snapshot item to Export Image

* [ios, macos] Clarify Snapshotter documentation.

* [ios] Fix snapshot scale

* [macOS] Fix snapshotter 4x scaling.

* [ios] Fix snapshotter final image scale.

* [ios, macos] Update snapshotter size documentation.

* [ios, macos] Throw an exception when the snapshotter has already started.

* [ios, macos] Add snapshotter header example.

* [ios, macos] Use one of the predefined Foundation's exception names.
2017-10-04 10:03:03 -04:00
Konstantin Käfer
64c75b442c [build] split out DefaultFileSource and dependents to a separate target
We don't want to link it into the node bindings, so keep it in a separate target
2017-09-28 13:48:36 -04:00
Fabian Guerra
6d1fdf2ca3 Merge branch 'release-ios-v3.6.0-android-v5.1.0' into master.
# Conflicts:
#	circle.yml
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/dependencies.gradle
#	platform/default/mbgl/storage/offline_database.cpp
#	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/ios/app/Main.storyboard
#	platform/ios/src/MGLMapView.mm
#	src/mbgl/programs/attributes.hpp
#	src/mbgl/renderer/painter_fill.cpp
#	src/mbgl/tile/geometry_tile.hpp
#	src/mbgl/tile/geometry_tile_worker.cpp
#	src/mbgl/tile/raster_tile.cpp
#	src/mbgl/tile/raster_tile.hpp
#	src/mbgl/tile/raster_tile_worker.cpp
#	test/tile/annotation_tile.test.cpp
#	test/tile/geojson_tile.test.cpp
#	test/tile/raster_tile.test.cpp
#	test/tile/vector_tile.test.cpp
2017-09-27 12:08:24 -04:00
Minh Nguyễn
393ebc3ee8 macos-v0.5.1 2017-09-25 13:44:44 -07:00
Minh Nguyễn
453c13dee2 [android, ios, macos] Updated translations
Updated Catalan, Spanish, Swedish, Traditional Chinese, Ukrainian, and Vietnamese.
2017-09-22 10:05:40 -07:00
Lauren Budorick
a9ddf5b7fd Preserve depth buffer between 3D layers + optimize render order (#9931)
Port of https://github.com/mapbox/mapbox-gl-js/pull/5101: adds a new render pass `Pass3D` before any other rendering wherein we render layers with 3D passes (fill-extrusion layers) to offscreen framebuffers, sharing a depth renderbuffer between those layers in order to render 3D space correctly. Those framebuffers are saved on the RenderLayers and copied back to the map during the translucent pass. Rendering to offscreen framebuffers before we do any clear + draw means we can avoid expensive framebuffer restores.
2017-09-21 14:26:48 -07:00
Fabian Guerra Soto
b2e33a452d [ios, macos] Deprecate trafficDayStyleURL and trafficNightStyleURL (#9918)
* [ios, macos] Deprecate trafficDayStyleURL and trafficNightStyleURL

* [ios, macos] Update changelogs.

* [ios, macos] Update trafficDayStyleURL and trafficNightStyleURL tests in MGLStyleTests.
2017-09-15 17:00:54 -04:00
Minh Nguyễn
ef12dc0822 [android, ios, macos] Russian, Ukrainian, Hungarian and other localization updates (#9945)
* [android, ios, macos] Updated Russian localization

Added a Russian localization of the Android SDK. Updated the iOS and macOS Russian localizations.

* [android, ios, macos] Updated Ukrainian localization

Added a Ukrainian localization of the Android SDK. Updated the iOS and macOS Ukrainian localizations.

* [ios, macos] Updated Traditional Chinese localization

* [macos] Added Hungarian localization

* [android] corrected typos

* [ios, macos] Updated Ukrainian localization

* [android, ios, macos] Configured Foundation.stringsdict on Transifex

* [ios, macos] Pulled in Foundation.stringsdict from Transifex

Updated the German, Lithuanian, and Vietnamese localizations with Foundation.stringsdict files matching Transifex.
2017-09-12 23:53:28 -07:00
Minh Nguyễn
161c5ed4f5 [macos] Updated changelog
This adds entries for work done on the master branch since v0.5.1 of the macOS Maps SDK.
2017-09-12 12:37:23 -04:00
Ivo van Dongen
d736429271 [macos] snapshotter 2017-09-05 16:29:33 +03:00
Fabian Guerra Soto
c8dc77f06f [ios, macos] Make minimumZoomLevel and maximumZoomLevel IBInspectable. (#9729)
* [ios, macos] Make minimumZoomLevel and maximumZoomLevel IBInspectable.

* [ios, macos] Update changelogs.
2017-08-30 16:25:57 -04:00
Fabian Guerra
a51ae29000 Merge branch release tag ios-v3.6.2 2017-08-29 11:24:42 -04:00
Anand Thakker
d436bcd56b Add {Source,CompositeCamera}Function benchmarks (#9838) 2017-08-29 10:03:57 -04:00
Fabian Guerra
acfe485302 Merge tag 'ios-v3.6.2' into master
# Conflicts:
#	cmake/core-files.cmake
#	include/mbgl/renderer/renderer_backend.hpp
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/IconManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
#	platform/android/dependencies.gradle
#	platform/darwin/src/MGLStyle.mm
#	platform/ios/CHANGELOG.md
#	platform/ios/app/Info.plist
#	platform/ios/app/MBXViewController.m
#	platform/ios/ios.xcodeproj/project.pbxproj
#	platform/macos/CHANGELOG.md
#	src/mbgl/gl/attribute.cpp
#	src/mbgl/gl/attribute.hpp
#	src/mbgl/gl/context.hpp
#	src/mbgl/gl/types.hpp
#	src/mbgl/gl/value.cpp
#	src/mbgl/gl/value.hpp
#	src/mbgl/map/backend_scope.cpp
#	src/mbgl/programs/attributes.hpp
#	src/mbgl/programs/program.hpp
#	src/mbgl/programs/segment.cpp
#	src/mbgl/programs/segment.hpp
#	src/mbgl/programs/symbol_program.hpp
#	src/mbgl/programs/uniforms.hpp
#	src/mbgl/renderer/buckets/symbol_bucket.hpp
#	src/mbgl/renderer/painter.cpp
#	src/mbgl/renderer/painter.hpp
#	src/mbgl/renderer/painter_background.cpp
#	src/mbgl/renderer/painter_circle.cpp
#	src/mbgl/renderer/painter_clipping.cpp
#	src/mbgl/renderer/painter_debug.cpp
#	src/mbgl/renderer/painter_fill.cpp
#	src/mbgl/renderer/painter_fill_extrusion.cpp
#	src/mbgl/renderer/painter_line.cpp
#	src/mbgl/renderer/painter_raster.cpp
#	src/mbgl/renderer/painter_symbol.cpp
#	src/mbgl/shaders/line.cpp
#	src/mbgl/shaders/line_pattern.cpp
#	test/renderer/backend_scope.test.cpp
2017-08-28 12:43:29 -04:00
Asheem Mamoowala
f2c9f2bf36 [ios][macos][node][android] Updated documentation and Changelogs for #9821 2017-08-22 16:49:59 -07:00
Asheem Mamoowala
d21f19686b Set Default MaxZoom to 22 2017-08-21 15:01:36 -07:00
Fabian Guerra Soto
c7d7319c77 [ios, macos] Fix querying features returning nil when features available. (#9784)
* [ios, macos] Fix querying features returning nil when features available.

* [ios, macos] Copyedited changelogs

Also, macOS SDK v0.5.1 has yet to be released, because none of the changes that went into iOS SDK v3.6.1 were relevant to macOS.
2017-08-17 19:19:06 -04:00
Fabian Guerra Soto
afd4df9dbc [ios] adapt Mapbox Streets–sourced layers for user preferred language (#9582)
* [ios] Update label localization

* [ios, macos] Move MGLVectorSource+MBXAdditions.h to darwin.

* [ios, macos] Adapt Mapbox Streets to the user preferred language.

* [ios, macos] Clarify style localization documentation.

* [ios, macos] Update localization examples

* [ios, macos] Add style language reset to original.

* [ios, macos] Update changelogs.

* [ios, macos] Rename Vector Source Additions to MGL standard.

* [ios, macos] Add suport for stop localization.
2017-08-01 16:14:41 -04:00
John Firebaugh
d4cb498d7a [all] Merge View into RendererBackend 2017-07-26 09:50:38 -07:00
John Firebaugh
32bd1d54fa [node, tests] Consolidate headless rendering logic in HeadlessFrontend 2017-07-26 09:50:38 -07:00
Ivo van Dongen
66e1429460 [ios][macos] manage backendscope in renderer frontend 2017-07-25 17:44:28 +03:00