Commit Graph

406 Commits

Author SHA1 Message Date
Jason Wray
cd36ec00bc [ios] Add debug descriptions to shapes and features 2017-08-18 12:26:25 -04: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
Nadia Barbosa
5d641f4d68 [ios] Add test for code snippet added to MGLPolyline doc change 2017-08-09 10:12:16 -04:00
Nadia Barbosa
2e24562ee8 [ios] Update MGLPolyline docs about antimeridian crossings 2017-08-09 10:12:16 -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
Fabian Guerra Soto
a1c5b32da6 Boxing ObjC structs (#9343)
* [ios, macos] Make structs boxable

* [ios, macos] Update changelogs.
2017-06-22 14:36:21 -04:00
Minh Nguyễn
b7ec96d352 [ios, macos] Corrected MGLSource subclassing documentation 2017-06-22 09:58:47 -07:00
Minh Nguyễn
2a5dc2d55b [ios, macos] Rewrote MGLStyle class documentation
The documentation comment now provides a high-level overview of the runtime styling API and its components, as well as the main workflow for using a style.
2017-06-22 09:58:47 -07:00
Fabian Guerra Soto
67c09b18e4 MGLLight autogenerate scripts (#9260)
* [ios, macos] Add the MGLLight generation templates

* [ios, macos] Add MGLLight generation script

* [ios, macos] Add the auto-generation script for MGLLight.mm

* [ios, macos] Add the auto-generation script for MGLLightTest.mm

* [core] Add const to Position constructor.

* [ios, macos] Simplify MGLLightTest.mm autogenerate script.
2017-06-16 06:41:51 -07:00
Jordan Kiley
df3af97389 [ios, macos] Revised descriptions for abstract classes (#9095)
Addresses https://github.com/mapbox/mapbox-gl-native/issues/8635
2017-06-14 11:26:34 -07:00
Fabian Guerra
87a05b29c9 [ios, macos] Fix MGLSphericalPosition.radial misleading type. 2017-06-12 15:17:02 -04:00
Minh Nguyễn
a39116a552 Migrate to GL JS–powered feedback form (#9078)
* [ios, macos] Updated feedback URL

* [ios, macos] Add referrer, heading, pitch to feedback URL

* [ios, macos] Updated changelogs for feedback changes

* [ios] Vary referrer by platform
2017-05-30 15:14:00 -07:00
Fabian Guerra
e1431f9085 [ios, macos] Fix MGLLight.achor to accept style functions 2017-05-24 14:47:47 -04:00
Jason Wray
9b11bb98fa [ios] Fallback to Mapbox.bundle as the framework bundle (#9074)
Fixes an issue where localizations could not be found when using static builds.

Throws exception if our bundle can't be found.
2017-05-23 13:24:16 -04:00
Fabian Guerra Soto
a57e9bc410 [ios,macos] multipolygon coordinate (#8713)
* [ios] MGLMultiPolygon's coordinate property implemented

* [ios,macos] Add polylabalel to project config

* [ios,macos] Change coordinate property for MGLPolyline,MGLPolygon,MGLMultiPolygon

* [macos] Change project configuration to support polilabel

* [ios,macos] Add MGLLocationCoordinate2DFromPoint

* [ios, macos] Update changelogs

* [ios, macos] remove unnecesary variables

* [ios, macos] Add radians conversions

* [ios, macos] Add coordinate calc to MGLPolyline

* [ios, macos] Move radian fuctions to MGLGeometry_Private.h

* [ios, macos] Fix code style

* [ios, macos] Fix code indentation

* [ios, macos] Fix radian per meters constant

* [ios, macos] Add test scenarios to testPolyline

* [ios, macos] Fix test accuracy
2017-05-23 12:32:18 -04:00
Fabian Guerra Soto
e52249c17f [ios, macos] Light property implementation in MGLStyle (#9043)
* [ios, macos] Add MGLLight to MGLStyle

* [ios, macos] Implement Objc bindings for Light object

* [ios, macos] Remove rawLight from MGLLight and re-implement it as value class

* [ios, macos] Fix build on macos

* [ios, macos] Add MGLLight documentation, Move MGLLightPosition to MGLLight

* [ios, macos] Add MGLLight tests.

* [ios, macos] Update changelogs

* [ios, macos] Fix misspelling

* [ios, macos] Fix MGLLightAnchor enum property names

* [ios, macos] Update documentation. Improve varialble naming.

* [ios, macos] Rename MGLLightPosition to MGLSphericalPosition

* [ios, macos] Update data types of MGLSphericalPosition
2017-05-23 10:59:24 -04:00
Jordan Kiley
a19fd81730 [ios, macos] changed TRUE -> 'true' (#9059) fixes #9056 2017-05-19 16:08:03 -07:00
Jordan Kiley
13dee80e2e [ios, macos] Updated maximumZoomLevel description, cherry-picked #8818 (#8842)
Cherry-picked from a3e4e67ea6.
2017-05-19 12:46:09 -07:00
Jesse Bounds
7612e23dff [ios, macos] Change == to = in style function initializers 2017-05-19 08:06:24 -07:00
Minh Nguyễn
30b919196b [ios, macos] Factored out tile URL template guide
Factored out redundant tile URL template documentation from the MGLRasterSource and MGLVectorSource documentation into a jazzy guide. This documentation used to live in one place, on a method on MGLTileSource, but that method had to be moved to MGLTileSource’s concrete subclasses. A jazzy guide is easier to link to, in any case.
2017-05-16 16:42:31 -07:00
Jordan Kiley
c7acb5516b [ios, macos] edited identity interpolation mode documentation (#8657) 2017-05-15 11:27:10 -07:00
Minh Nguyễn
886bf2528f [core, android, ios, macos] Added Traffic Day/Night to default styles
The Styles API section of the Mapbox API Documentation site now lists Traffic Day v2 and Traffic Night v2, so this change adds those styles to all the places where styles are listed.

Also switched iosapp and macosapp to unversioned style factory methods since MGLStyleDefaultVersion is no longer applicable for all styles.

Cherry-picked from 4d6f54553d.
2017-05-12 10:02:27 -07:00
Minh Nguyễn
c5ee41a93a [ios, macos] Undeprecated unversioned style URL factory methods
Undeprecated the unversioned style URL factory methods in MGLStyle for consistency with the Android and Qt SDKs. Added warnings about using them with the runtime styling API.

Refactored mbgl::util::default_styles to track different versions for different styles.

Cherry-picked from 9e384b78fb.
2017-05-12 10:02:27 -07:00
Minh Nguyễn
d85471b7de [ios, macos] Updated documented default style version
MGLStyleDefaultVersion is just for Streets now. Deleted style version documentation tests because not all styles are on the same version.

Cherry-picked from ca97dd8cf4.
2017-05-12 10:02:27 -07:00
Minh Nguyễn
0ef1293dad [core, android, ios, macos, qt] v10 default styles
Upgraded from v9 default styles to v10 wherever the developer expects to get the latest and greatest, as well as in a couple tests where it may be beneficial to ensure that we can handle a two-digit version number in the style URL.

Cherry-picked from ed54849e99.
2017-05-12 10:02:27 -07:00
John Firebaugh
c2b00378b7 [all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
2017-05-02 08:45:09 -07:00
Lauren Budorick
f6e79d7073 [core] Render fill-extrusion layers (#8431) 2017-04-27 15:56:55 -07:00
John Firebaugh
5dd98df50b [all] Rationalize style::Image
A style has a collection of images, just as it has collections of sources and layers.

* Name things appropriately
* Use std::unique_ptr
2017-04-24 15:52:28 -07:00
Fredrik Karlsson
8eb23cbac8 [ios] Scale bar (#7631)
* [ios] added a scale bar

* [ios] update design

* [ios] show/hide scale bar

* [ios] Remove the need to localize 0

* [ios] Support for imperial units

* [ios] Round to nearest foot

* [ios] Make scale bar private

* [ios] Update design and clean up

* [ios] Rename and various optimizations

* [ios] RTL support

* [ios] added max scale and removed animations

* [ios] animate scale bar
2017-04-16 17:24:17 +02:00
Bruno de Oliveira Abinader
2f4d162deb [core] Tighten geo.hpp ctors 2017-04-14 12:33:13 -07:00
John Firebaugh
80d0420ea6 [darwin] Remove use of NS_DESIGNATED_INITIALIZER from MGLStyleLayer subclasses
It produces compiler warnings for which there seems to be no workaround, and since there's only a single initializer, NS_DESIGNATED_INITIALIZER has little benefit.
2017-04-13 10:33:18 -07:00
John Firebaugh
e5c6d2838d [darwin] Make -[MGLForegroundStyleLayer sourceIdentifier] abstract
It's already overridden by concrete subclasses, and by making it abstract we enable the removal of the private MGLForegroundStyleLayer category.
2017-04-13 10:33:18 -07:00
John Firebaugh
7b041b123c [core, darwin] Object identity for MGLSource*, MGLStyleLayer*
All `MGLSource` pointers referencing the same logical source will now be object identical; similarly for `MGLStyleLayer`.
2017-04-13 10:33:18 -07:00
John Firebaugh
de6c9b35f3 [darwin] Simplify MGLStyleLayer initialization and pointer management
Similarly to the previous commit, introduce `-[MGLStyleLayer initWithPendingLayer:]`, allowing the base class to track the owned `_pendingSource` pointer and implement `-addToMapView:` and `-removeFromMapView:` without any casts.

Fixes an issue where `-[MGLStyle layerFromMBGLLayer:]` would wind up creating layers whose `_rawLayer` and `_pendingLayer` held different values.
2017-04-13 10:33:18 -07:00
John Firebaugh
98d005792b [darwin] Simplify MGLSource initialization and pointer management
Introduce `-[MGLSource initWithPendingSource:]`, allowing the base class to track the owned `_pendingSource` pointer and implement `-addToMapView:` and `-removeFromMapView:` without any casts.
2017-04-13 10:33:18 -07:00
John Firebaugh
3a342c709c [darwin] Remove unnecessary MGLTileSource initializers 2017-04-13 10:33:18 -07:00
Minh Nguyễn
0cb05f926b [ios, macos] Clarify redrawing based on multipoint mutation
Clarified the documentation for various MGLMultiPoint methods to indicate that only shape annotations automatically redraw in response to the multipoint object being mutated; sources must be mutated explicitly.
2017-04-11 16:40:18 -07:00
Minh Nguyễn
6a0c4e0142 [macos] Remove link attribute from attribution text
Fixed an issue causing the attribution button text to appear blue instead of black. On macOS 10.12 and above, hyperlinks in attributed strings are blue regardless of any color attributes applied to the same run of text.
2017-04-10 22:06:36 -07:00
Anand Thakker
693c9f3641 [core] Add DDS support for {text,icon}-size (#8593)
* Update gl-js and generate style code

* Factor out packUint8Pair() helper function

* Draft implementation of DDS for {text,icon}-size

Ports https://github.com/mapbox/mapbox-gl-js/pull/4455

* Fix text-size/composite-function-line-placement test

* Refactor to PaintPropertyBinders-like strategy

* Dedupe gl::Program construction

* Use exponential function base for interpolation

* Dedupe coveringZoomStops method

* Fixup tests

* Fix CI errors (hidden within #if block)
2017-04-06 15:29:59 -04:00
Minh Nguyễn
8382420314 [ios, macos] Fail gracefully on invalid coordinates
Invalid coordinates no longer cause an exception to be raised immediately when used in conversion methods and model objects. Instead, the appropriate invalid values are used, consistent with MapKit. Exceptions are still raised when invalid model objects are used with the map.
2017-04-06 09:22:51 -07:00
Minh Nguyễn
ab6185fdc3 [ios, macos] Streamlined coordinate validation
Replaced preflight checks in MGLLatLngFromLocationCoordinate2D() with a try-catch block that relays exceptions raised by mbgl. De-inlined the function because it’s no longer trivial.
2017-04-06 09:22:51 -07:00
John Firebaugh
16a2839e23 [all] Make LatLng coordinates read-only 2017-04-06 09:22:51 -07:00
John Firebaugh
e6122d9bf0 [darwin] Preflight argument validity before constructing mbgl::LatLng 2017-04-06 09:22:51 -07:00
John Firebaugh
391a10db0e [darwin] Use MGLLatLngFromLocationCoordinate2D where appropriate 2017-04-06 09:22:51 -07:00
John Firebaugh
1a9bccbb85 [core] Add DDS support for icon-image 2017-03-31 14:17:33 -07:00
John Firebaugh
743d954053 [core] Add DDS support for text-rotate 2017-03-31 13:26:27 -07:00
Molly Lloyd
47c1e42ac1 [core] implement dds for text-offset 2017-03-28 11:06:58 -07:00
Konstantin Käfer
234384ece9 [core] Move OpenGL extension initialization to Backend 2017-03-23 14:50:11 -07:00
John Firebaugh
d7227e13a7 [all] Replace Result<T> with optional<T> plus out Error parameter 2017-03-23 13:31:13 -07:00
John Firebaugh
e488ca702e Merge branch 'release-ios-v3.5.0-android-v5.0.0' 2017-03-21 12:04:20 -07:00