Commit Graph

9257 Commits

Author SHA1 Message Date
Ivo van Dongen
2c4e7ae70f [core] guard against duplicate source id’s 2016-12-02 11:25:30 -08:00
Jesse Bounds
8317a11a10 [ios] Update changlog for ios-v3.3.7 2016-12-01 17:02:12 -08:00
Jesse Crocker
5dd71d3c30 [ios, macos] Make tap gesture recognizer fail if it doesn’t do anything (#7246)
* Make tap gesture recognizer fail if it doesn’t do anything.

* fix typo

* Use the right nullable

* update changelog

* Make single click gesture recognizer fail if it doesn’t select an annotation

* fix changelog typo

* Remove singleTapGestureRecognizer from public header
2016-12-01 11:50:20 -08:00
Jesse Bounds
b2c2d4ebc4 [ios, macos] Update style predicate documentation
Note the support of CONTAINS and the lack of support for case and
diacritic operator modifiers.
2016-12-01 08:57:41 -08:00
Jesse Bounds
7e9457214a [ios, macos] Add back support for CONTAINS operator
This reverts commit 6877e3efe7.
2016-12-01 08:57:41 -08:00
Jesse Bounds
dbb520662d [ios, android] Move der files to ios platform
.der files are used only by the iOS platform for SSL pinning. This
moves them out of the `platform/default/resources` directory and into
`platform/ios/resources`. The make configuration for Android is
updated so that it stops attempting to copy the files at all.
2016-11-30 16:19:22 -08:00
Jesse Bounds
e9504912dc [ios] Use new pinning cert for staging
This updates the cert for the staging environment. It also adjusts the
telem implementation to send along the horizontal accuracy for each
location event and removes the previous battery level gathering logic.
2016-11-30 16:19:22 -08:00
Jesse Bounds
37a087c675 [ios, macos] Avoid unsafe cast when removing style layers (#7227)
This updates the code generation for style layers to add a test to check
that the style object returned from mbgl can be safely cast into the
expected type so ownership can be returned to the caller when removing
layers.

This scenario was previously possible if a layer of type T was
added before a layer of type U but both layers shared the same
identifier. In that case, if the pointer to the second layer of type U
was used to remove a layer, a runtime exception would occur since mbgl
returns the layer with type T (the first one added).

Now, an exception will still occur if layers with the same
identifier are manipulated as described above but it is done as part of
a validation check for all public style layer methods at the Darwin
platform level. The NSException attempts to warn developers about using
and reusing style identifiers to avoid this issue in the first place.
2016-11-30 11:59:29 -08:00
Jesse Bounds
ba775404d8 [ios, macos] Add notes to APIs that rely on style and source ids (#6886)
Update documentation to make the implications of identifiers clearer.
2016-11-30 09:26:21 -08:00
Fredrik Karlsson
17db5210bf [ios, macos] rename style spec properties 2016-11-30 11:36:39 +01:00
Minh Nguyễn
4096544188 [ios, macos] Marked C array parameters as const
Fixes #7214.
2016-11-29 22:47:30 -08:00
Minh Nguyễn
336d48df48 [ios, macos] Fixed spurious offline storage test failure
Even if the expectation is immediately fulfilled, we still have to wait for it to be fulfilled, because the expectation only gets unregistered after waiting. The zombie expectation was fulfilling a stricter expectation in a test method.
2016-11-29 13:36:55 -08:00
Jesse Bounds
d830c48e4a [ios, macos] Refcount view activations (#7208)
This adds a ref count to guard against calling activate after it has
already been called. This can happen when a layer is added during
certain map lifecycle methods like MapChangeWillStartRenderingFrame
that also triggers activation. This also protects against issues
related to a deactivation of the context happening in an inner scope
while an outer scope is still expecting to be able to use the context.
2016-11-29 08:56:59 -08:00
Minh Nguyễn
83e134eb9f [macos] Added option to localize labels
Added a setting to macosapp to change all symbol layers in the current style to use the preferred language if available. If the setting is off, change all symbol layers to use local languages.
2016-11-28 15:45:44 -08:00
Minh Nguyễn
f611355912 [macos] Name custom style in toolbar
Display the custom style’s name in the Style toolbar button.
2016-11-28 15:45:44 -08:00
Minh Nguyễn
992726ab49 [macos] Added Layers sidebar
Added a sidebar to the main document window in macosapp that lists the layers in the current style and updates whenever the style changes or a layer is added or removed programmatically. Display an icon beside each layer in the sidebar that indicates the kind of layer. Double-click a layer or layers to toggle their visibility, which is an undoable action. Added a menu item and toolbar button to toggle the Layers sidebar. Added a context menu for toggling visibility of and deleting layers selected in the Layers sidebar.

Checked in the original SVGs for layer icons.
2016-11-28 15:45:43 -08:00
Minh Nguyễn
03a2dbe361 [macos] Avoid first responder action name conflict
Fixed a crash that often occurred when switching styles. MGLMapView was ahead of MapDocument in the responder chain, so calls to -setStyle: were going to MGLMapView’s private -setStyle: method. The sender was being passed in the first parameter instead of an MGLStyle method.
2016-11-28 15:45:43 -08:00
Minh Nguyễn
9fac640bf3 [ios, macos] Key-value compliance for MGLStyle
Replaced -[MGLMapView style] with a property. Keep the MGLStyle object around for the lifetime of the style.

Bracket changes to layers in willChange and didChange calls. The built-in point annotation layer is added after the style is finished loading but before the map is finished loading. Cause a second wave of change notifications to go out, about both sources and layers. Issue change notifications for style layers when shape annotations are added or removed.
2016-11-28 15:45:43 -08:00
Minh Nguyễn
850b70ff91 [core, ios, macos] Added layers and sources properties to MGLStyle
Added new layers and sources properties to MGLStyle that contain all the style’s layers and sources, respectively. These properties are KVC-compliant with all the mutable to-many methods. Layers are ordered from topmost to bottommost, for consistency with Cocoa APIs where front/first means top and back/last means bottom.

Also added storage for mbgl::style::Source in MGLSource proper for wrapping AnnotationSource. Until the style finishes loading, its name property is set to nil.

Fixes #6003.
2016-11-28 15:45:37 -08:00
Minh Nguyễn
f71dd14bb7 [ios, macos] Reorganized MGLStyle 2016-11-23 16:02:18 -08:00
Minh Nguyễn
767044420d [ios, macos] Added debug descriptions for runtime styling classes 2016-11-23 16:02:17 -08:00
Jesse Bounds
67e079f726 [ios, macos] Fix integer formatting in formatted exception strings (#7173) 2016-11-23 12:21:52 -08:00
Jesse Bounds
75666e5b53 [ios, macos] Use namespaced property names in style NSValue category (#7171) 2016-11-23 08:20:47 -08:00
Jesse Bounds
238197c3e2 ios-v3.4.0-beta.4 2016-11-23 06:04:11 -08:00
Jesse Bounds
d6d16c189a [ios, macos] Remove unused MGLGeometryAdditions category stub
This fixes an issue where the documentation for all NSValue categories
were described as `MGLGeometryAdditions`.
2016-11-22 19:53:54 -08:00
Jesse Bounds
13e0f9e527 [ios, macos] Refactor runtime styling enumeration properties
Correctly map SDK runtime styling enumerations to mbgl
equivalents. Also, add category methods to NSValue so enums
can be wrapped up with less of the details of how they
are layed out in memory in Objective-C.
2016-11-22 19:53:54 -08:00
Minh Nguyễn
4e4e05ef50 [ios, macos] Updated changelog for #7091 2016-11-22 08:34:16 -08:00
Konstantin Käfer
8fa078c086 [core] cache raster tiles 2016-11-22 08:32:02 -08:00
Fredrik Karlsson
307f8e4f41 [ios] simplified constraints and fixed regression 6954 (#7084)
* [ios] simplified constraints and fixed regression 6954

* [ios] removed excessive constraints

* [ios] removed compass container view
2016-11-20 13:16:20 +01:00
Minh Nguyễn
e858dba86d [ios, macos] Documented localization workflow 2016-11-18 10:38:57 -08:00
Fredrik Karlsson
b4aba87892 [ios, macos] override style spec documentation 2016-11-16 11:50:36 +01:00
Jesse Bounds
7e6d8db136 Release ios-v3.4.0-beta.3 (#7082) 2016-11-15 13:47:13 -08:00
Jesse Bounds
068a89c2f8 [ios, macos] Use NSNumber in exception strings (#7083) 2016-11-15 13:39:09 -08:00
Minh Nguyễn
5a982f9ccc [ios, macos] Updated changelog 2016-11-15 13:21:24 -08:00
Justin R. Miller
9d5edb41ad [ios, macos] refs #7060: properly check removed layers & sources (#7062) 2016-11-15 11:37:35 -08:00
Justin R. Miller
eefda0d381 [ios, macos] fixes #7059: raise exception for abstract sources on add (#7060) 2016-11-15 11:36:04 -08:00
Fredrik Karlsson
07b311d490 [ios] update layout after device has been rotated 2016-11-15 17:53:50 +01:00
Jason Wray
40a7e6b414 [ios] Constrain compass directly to the top layout guide
In iOS 10, the top layout guide is not always returning the expected
value unless there is a constraint applied directly against it.
2016-11-15 17:53:50 +01:00
Jason Wray
13c6648713 [ios] Make map view UI elements' constraints unambiguous
NSLayoutRelationGreaterThanOrEqual meant that it either greater-than or
equal could satisify the constraint, when really all we need is equal.
2016-11-15 17:53:50 +01:00
Jesse Bounds
1c9d314236 [ios, macos] Take back source and layer ownership on removal (#7048)
If a source or layer is removed from the style, recapture the
unique pointer ownership. This makes it safe to add back sources
and layers after they have been removed.
2016-11-14 15:50:33 -08:00
Minh Nguyễn
56c2272b7d [ios] Upgraded to KIF 3.5.1, OHHTTPStubs 5.2.2 2016-11-14 11:12:04 -08:00
Minh Nguyễn
1f4c317feb [ios] Pull in OHHTTPStubs project reference
Removed individual OHHTTPStubs file references from the ios-tests project. Added a reference to the OHHTTPStubs project to the workspace. Link ios-tests to its iOS framework build product.
2016-11-14 11:12:04 -08:00
Konstantin Käfer
f968ede11b [core] don't run symbol placement more often than necessary 2016-11-14 10:33:21 -08:00
Jesse Bounds
44e398865e [ios, macos] Use std::vector for MGLMultiPoint coordinate storage (#6890)
Refactor the previous C array based implementation to use C++ std::vector. This is done to avoid potential safety and security issues with the previous approach.
2016-11-14 09:34:22 -08:00
Jesse Bounds
96a7a4402e [core] Return source and layer ownership (#7014)
When a source or layer is removed transfer ownership back to the
caller so it can (optionally) take it. Preserve the behavior that 
removing a CustomLayer triggers deinitialization.  Deinitialize all 
custom layers when a style is destroyed in case those layers are not 
explicitly removed.
2016-11-13 19:56:29 -08:00
Fredrik Karlsson
82fcd58121 [ios] specify plist-file for settings bundle 2016-11-13 17:28:00 -08:00
Ivo van Dongen
13a118e3bd [core] symbol layer - recalculate style on icon/text size changes 2016-11-13 16:53:11 -08:00
Bruno de Oliveira Abinader
b7818f2019 [core] Fix render tile ordering when querying sources 2016-11-13 16:10:36 -08:00
Bruno de Oliveira Abinader
610f43cfd2 [linux] Use OSMesa when running Node tests 2016-11-13 16:10:36 -08:00
Bruno de Oliveira Abinader
1b23795097 [linux] Update target headless backends
Enable OSMesa backend via WITH_OSMESA=1 envvar.

OSMesa backend uses Gallium OSMesa implementation, which uses
LLVMpipe as default driver.
2016-11-13 16:10:36 -08:00