In https://github.com/mapbox/mapbox-gl-native/commit/f791eb32b9 we simplified the package
script and intended to remove support for building the SDK without
Bitcode support. The intention was to use the ENABLE_BITCODE project
setting to do this and remove the control of that variable in the
script. However, since we use `xcodebuild build` this only uses
bitcode `marker` by default and causes a failure when an app that uses
the Mapbox SDK is archived.
This adds the `BITCODE_GENERATION_MODE` and `bitcode` value to the
necessary iOS SDK and mbgl and platform targets. If the SDK is compiled
with these flags set, it will be successfully processed in the bitcode
phase in an app archive operation.
This also removes the `BITCODE` flag from the Makefile since the
intention is to not support building the SDK without bitcode support
and the presence of that option might be confusing.
* [ios] #3979 wip gzip telemetry events
* [ios] expose compression from core instead of adding a new dependency
* [ios] #3979 Exposed decompress from mbgl and added a test case
* [ios] #3979 cleanup
* [ios] #3979 cleaned up test case
* [ios] #3979 cleanup
* [ios] #3979 gzip -> deflate
We don’t normally want an annotation view to animate its position, because that makes the view appear to lag behind the map. But when the annotation view moves due to the underlying annotation model object moving, the developer may want exactly that effect.
This change continues to disable the default implicit bounds (and now position) animation. It also groups the view updates in -updateAnnotationViews in a transaction that disables animation actions, to improve perceived performance with a large number of annotations. However, when the annotation model object changes, we move the annotation view outside of that transaction to allow the developer to opt into animation.
If the developer moreover wants the annotation view to animate even due to the viewport changing, they can override -setCenter: to use a UIView animation block.
Fixes#5230.
Always reposition the annotation view using the standard -setCenter: setter, fixing KVO compliance for the center key path and making the view behave more like a normal view. -setCenter: updates the transform by side effect, and it always starts from the identity transform to avoid surprises. To apply a custom transform on an annotation view, make sure to apply it in -mapView:didFinishLoadingFrame:fullyRendered: based on the existing transform.
Reorganized MGLMapViewDelegate and MGLAnnotationView symbols into sections by task. Wrapped documentation comments at column 80 for readability.
Added documentation for -mapViewWillStartRenderingFrame: and -mapViewDidFinishRenderingFrame:fullyRendered:, which are supported and behave as expected (except for the part that has been left undocumented). Synchronized iOS and macOS documentation for MGLMapViewDelegate. Added cross-references between annotation image and annotation view delegate methods and among the various callout delegate methods.
Added missing MGLAnnotationViewDragState documentation and also added the symbol to jazzy’s table of contents. Rewrote MGLAnnotationView documentation.
- Based on Jazzy's "full width" theme.
- Add ellipsis to overlong items in navigation menu.
- Set minimum width for navigation menu.
- Use Open Sans font face.
- Inline GitHub header icon as SVG.
- Center images by default.
- Add GitHub SVG icon to 'show on github' link.
- Wrap overlong method names on class pages.
* [ios] Adds the ability to customize map deceleration speed
* [ios] Made pinch, rotation deceleration adjustable too
Drift zooming and drift rotation also respect the deceleration rate. A side effect of this change is that drift zooming will come to a stop ever-so-slightly sooner now.
* [ios] Documented deceleration rates
Added documentation for deceleration rate constants. Also updated the changelog.
The map events instigated by certain actions
(i.e. updates from a UIScrollView) are not processed by the run loop
with `kCFRunLoopDefaultMode`until the thread is idle. This changes
the mode to `kCFRunLoopCommonModes` to avoid this issue.
This removes the guard that used to be in place from the time when
UIView backed annotations did not have invisible image placeholders.
Since images are now present for both sprite and UIView backed
annotations, the guard is no longer necessary and removing it allows
for the correct symbol name to be passed to the map object and this
gets rid of `[INFO] {Worker}[Sprite]: Can't find sprite named
'default_marker'` log message.
This fixes two issues with annotation views that were exposed when
dragging them:
1) The annotation view's mapView property was not set until it was
moved (in `updateAnnotations:`) so it did not always call its delegate
back about the map view delegate dragging methods. This adds a call to
set the property when an annotation view is created so the delegate
methods are always called.
2) Since the mapView is now always set, a call to the map view's
callout view for selected annotation was added to the annotation
view drag handler. This forces the callout to close and eliminates
an issue where the callout would remain visible as an annotation
was dragged away which had the visual effect of a detached
callout.
To make 2 possible, the map views selected callout view was exposed
in the private header.
Fixed a crash on iOS 8.1 and below due to specifying the compass legend’s font weight using a font weight constant that was introduced in iOS 8.2.
Fixes#5486.
The current implementation of view backed annotations mostly relies
on the existing annotation model manager and the associated underlying
boost query implementations for annotation management. However, since
the representation of the model is a view, an image was not installed
for view backed annotations. Because the underlying annotation
management implementation is not entire comfortable working without
an image, it would report
`[INFO] {Worker}[Sprite]: Can't find sprite named 'default_marker'`
when annotation models without an image were encountered.
This updates the annotation adding logic in to create (or reuse) and
install a small, invisible image for each view backed annotation.
This changes the way the the calculation for the largest visual
annotation representation (stored in
_unionedAnnotationRepresentationSize) is done so that it includes both
images and views. The `annotationTagAtPoint` method is then able to
find annotation objects that are in a query rect formed from the
sizes of all manner of point annotation visual representations.
The `annotationTagAtPoint` method also gains new logic in a conditional
to handle annotations backed by MGLAnnotationViews. Similarly to
the image case, it filters out disabled annotations and calculates
a centered rect for the view. The hit test logic remains the same but
now works correctly for both the centered rects of both images and views.
This also fixes a bug where the `largestAnnotationViewSize` was always
holding the last annotation view size and not necessarily the largest.
This would affect when annotation views are put into a reuse queue since
the size is used to help determine when an annotation view has gone
offscreen.
A verb doesn’t make sense in this enum value. Instead, use a descriptive word for this effect and describe it in detail in the documentation comment.
Cherry-picked from 415c182946.
When using a subclass of `MGLAnnotationView` or `MGLAnnotationImage`, the following warning occurs:
`Incompatible pointer types initializing 'MyClassName *' with an expression of type 'MGLAnnotationView * _Nullable'`
This change eliminates the warning and matches Apple's implementation of `UITableViewCell`.
Cherry-picked from 1e41c151f6.
* [ios] Support for a customizable zoom gesture centering strategy.
We introduce a new MGLZoomGestureCentering enum and corresponding zoomGestureCentering property on MGLMapView.
Currently, Mapbox automatically adjusts the center of the map relative to the user's gesture location, but for some applications (e.g Uber, Lyft) it is preferable to keep the map center "locked" in response to zoom gestures.
Exisiting code will retain its current behavior without modification and will implicitly use the default value of MGLZoomGestureCenteringFollowsTouch. New code can specify MGLZoomGestureCenteringLockedInPlace to get the new "locked" behavior.
* [ios] Added -anchorPointForGesture: to MGLMapView
Cherry-picked from b915f05a06.
On each frame update, update annotation views before informing the delegate of the new frame. This allows the delegate to manipulate annotation views without fear of the SDK overriding those modifications.
iOS
- Add section headers.
- Add more detail to `make` packaging commands and emphasize that Debug
is the default build type.
- Manually checking out git submodules is no longer necessary.
Core
- Add 'Keeping up to date' section that mentions submodules.
delete[] was being called for a malloc() allocated C buffer.
Found by valgrind:
```
==23065== Mismatched free() / delete / delete []
==23065== at 0x4C2F77B: operator delete[](void*) (vg_replace_malloc.c:621)
==23065== by 0x50C5529: std::default_delete<unsigned char []>::operator()(unsigned char*) const (unique_ptr.h:119)
==23065== by 0x523EC85: std::unique_ptr<unsigned char [], std::default_delete<unsigned char []> >::reset(unsigned char*) (unique_ptr.h:581)
==23065== by 0x523E3D4: mbgl::Raster::upload(mbgl::gl::ObjectStore&) (raster.cpp:63)
==23065== by 0x520CA08: mbgl::RasterBucket::upload(mbgl::gl::ObjectStore&) (raster_bucket.cpp:16)
==23065== by 0x520E56A: mbgl::Painter::render(mbgl::style::Style const&, mbgl::FrameData const&, mbgl::SpriteAtlas&) (painter.cpp:130)
==23065== by 0x52BE15A: mbgl::Map::Impl::render() (map.cpp:265)
==23065== by 0x52BD9BE: mbgl::Map::render() (map.cpp:175)
==23065== by 0x50C9EB4: QMapboxGL::render() (qmapboxgl.cpp:579)
==23065== by 0x4056D3: MapWindow::paintGL() (mapwindow.cpp:166)
```