Commit Graph

8040 Commits

Author SHA1 Message Date
Fredrik Karlsson
d4f5a37c43 [ios] omit podspec for static lib (#5595) 2016-07-06 22:13:02 +02:00
Jesse Bounds
687013bc99 [ios] Add support for full Bitcode builds (#5586)
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.
2016-07-06 08:09:10 -07:00
Fredrik Karlsson
9993017cc9 [ios] fixes #4536 include podspec in iOS releases (#5569) 2016-07-06 11:09:50 +02:00
Fredrik Karlsson
7b6ef80b5d [ios] fixes #5544 support canceling a drag operation and not by default (#5561) 2016-07-05 22:47:54 +02:00
Fredrik Karlsson
546469459f [ios] #3979 compress telemetry events (#5490)
* [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
2016-07-05 22:46:04 +02:00
Minh Nguyễn
b2197236b6 ios-v3.3.0-beta.3 2016-07-03 17:10:10 -07:00
Minh Nguyễn
2bcc8749e3 [ios] Split release notes into sections by topic 2016-07-03 16:20:39 -07:00
Minh Nguyễn
288b71b671 [ios] Simplified MBXAnnotationView
Eliminated the center view in favor of applying a background color and border to the annotation view’s layer.
2016-07-02 21:00:48 -07:00
Minh Nguyễn
bb2f627b12 [ios] Made annotation view position animatable
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.
2016-07-02 21:00:41 -07:00
Minh Nguyễn
bb4606b53d [ios] Fixed KVO for annotation view center
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.
2016-07-02 21:00:36 -07:00
Minh Nguyễn
649b068270 [ios] Avoid resetting pitch along with center offset
Fixed a bug causing an annotation view to be scaled based on a pitch of 0° when setting the view’s center offset.
2016-07-02 21:00:36 -07:00
Minh Nguyễn
0d7d2449b1 [ios] Fixed auto-shrinking annotation views
Fixes #5547.
2016-07-02 20:20:05 -07:00
Minh Nguyễn
f2fdc23ec7 [ios] Removed MGLAnnotationView.flat
Removed MGLAnnotationView’s option to lie flat against a tilted map to work around #5090.
2016-07-02 18:41:11 -07:00
Minh Nguyễn
1f026c6246 [ios] Removed custom getter
isScaledWithViewingDistance is unnecessary.
2016-07-02 13:55:36 -07:00
Minh Nguyễn
50dd60aaf6 [ios, macos] Rewrote MGLMapViewDelegate, MGLAnnotationView docs
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.
2016-07-02 13:54:41 -07:00
Jason Wray
388fdd2ff7 [ios, macos] Update changelogs for new Jazzy theme 2016-07-01 14:51:52 -04:00
Jason Wray
c75caa650b [ios] Update and bundle docs screenshot
- Don't use an absolute URL for the screenshot image, include the file instead.
- Add Sketch document for screenshot.
2016-07-01 14:45:45 -04:00
Jason Wray
2e0ab45f42 [ios] Place MGLCoordinateInCoordinateBounds in jazzy's Geometry section
Added in https://github.com/mapbox/mapbox-gl-native/pull/5053 but wasn't categorized for jazzy.
2016-07-01 14:44:51 -04:00
Jason Wray
bacf8eee70 [ios, macos] Add Mapbox Jazzy theme
- 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.
2016-07-01 14:44:51 -04:00
Minh Nguyễn
5389f04da5 Adjustable map deceleration rate (#5504)
* [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.
2016-06-29 15:48:02 -07:00
Jesse Bounds
f7b646cac5 [ios, macos] Use common instead of default mode for run loop source (#5503)
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.
2016-06-29 11:14:34 -07:00
Jesse Bounds
2933ef1c09 [ios] Always use symbol name for annotation update (#5509)
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.
2016-06-29 11:14:10 -07:00
Jason Wray
1a6b513703 [ios] Fix conflict between view dragging gesture and quick zoom (#5506)
This stops the quick zoom gesture (double-tap and hold) from also triggering a drag, when performed on a draggable annotation view.
2016-06-29 12:48:53 -04:00
Fredrik Karlsson
bf079a285f [ios] prevent a race condition by not fulfilling the expectation until the view has been added (#5507) 2016-06-29 13:57:49 +02:00
Jesse Bounds
16b859ff5f [ios] Always set map view reference when annotation view is created. (#5496)
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.
2016-06-28 12:07:12 -07:00
Minh Nguyễn
c96b7dae68 [ios] Specify ultra light weight literally (#5497)
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.
2016-06-28 10:03:55 -07:00
Fredrik Karlsson
72c342284c [ios] map view now calls -didAddAnnotationViews (#5466) 2016-06-27 17:19:58 +02:00
Jesse Bounds
2d9ffcbadb Update podspec files for v3.3.0-beta.2 2016-06-24 14:45:42 -07:00
Jesse Bounds
d9a1033b2a [ios] Use transparent image for annotations backed by views (#5461)
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.
2016-06-24 11:27:23 -07:00
Fredrik Karlsson
d29bef957f [ios] fixes #5036 draggable annotation views (#5373) 2016-06-24 19:42:20 +02:00
Jesse Bounds
05b6e72493 [ios] Cycle through both UIView and UIImage backed annotations
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.
2016-06-23 12:04:23 -07:00
Minh Nguyễn
f5f39c8b3a [ios, macos] Renamed overdraw to overdraw visualization (#5416)
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.
2016-06-23 00:03:51 -07:00
Fredrik Karlsson
3995d6ff68 [ios] fixes #5406 view for annotation (#5413) 2016-06-21 15:21:22 +02:00
Jason Wray
a7d5717cf5 [ios] Disable telemetry while Low Power Mode is enabled
Low Power Mode is iOS 9+, so some availability checks must be made.
2016-06-20 14:06:54 -04:00
Minh Nguyễn
061854990f [macos] Renamed OS X SDK to macOS SDK
Also renamed as many references to OS X as possible to macOS in documentation.

Cherry-picked from b9702ef41a.
2016-06-18 14:58:07 -07:00
Fredrik Karlsson
d564302c6d [ios] fixes #5129 added annotation property to MGLAnnotationView (#5307)
Also added a test case for MGLAnnotationView
2016-06-14 13:12:56 +02:00
Fredrik Karlsson
a557e1e2c9 [ios] fixes #5127, #5128, #5130 added enabled and selected property to MGLAnnotationView (#5297)
[ios] fixes #5127, #5128, #5130 added enabled and selected property to MGLAnnotationView
2016-06-14 10:36:41 +02:00
Alan Kinnaman
19c34fe1f0 Suppress warning when dequeueing subclasses (#5244)
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.
2016-06-14 00:17:44 -07:00
Minh Nguyễn
383df9dd21 [ios] Updated changelog for #5302
Cherry-picked from 6998479d05.
2016-06-09 17:11:31 -07:00
Mark Allen
dd565b701b [ios] Support for a customizable zoom gesture centering strategy. (#5302)
* [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.
2016-06-09 17:05:50 -07:00
Minh Nguyễn
4e808994cb [ios] Update annotation views before informing delegate (#5287)
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.
2016-06-08 14:25:08 -07:00
Jesse Bounds
0b6daae05d [ios] Updated changelog for v3.2.3 2016-06-08 13:18:25 -07:00
Minh Nguyễn
4ea782be11 [ios] Updated changelog for v3.3.0 2016-06-07 14:16:28 -07:00
Minh Nguyễn
e503f9279f Fix crash in userLocationVerticalAlignment, analyzer warning (#5278)
* [ios] Fixed crash in userLocationVerticalAlignment

Avoid creating an array with nil.

Fixes #5274.

* [ios] Fixed analyzer warning

Fixed a write-without-read analyzer warning introduced in #5235.
2016-06-07 14:14:41 -07:00
Jason Wray
9746f76744 [docs] Reorganize and update development instructions (#5233)
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.
2016-06-07 13:55:14 -07:00
Thiago Marcos P. Santos
62bc6e29c8 [core] Fix deleter mismatch
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)
```
2016-06-07 23:34:50 +03:00
Bruno de Oliveira Abinader
cfac924606 [core] s/SharedTexture/PooledTexture/ 2016-06-07 22:42:18 +03:00
Minh Nguyễn
20fe1d2be4 [ios] Point podspec to API reference (#5267)
The Documentation link on CocoaPods.org should point to the API reference, not to the main ios-sdk front page, which is already linked right above.
2016-06-07 12:22:10 -07:00
Mike Morris
ba5d2a4b4d node-v3.2.1 2016-06-07 11:57:53 -04:00
Bruno de Oliveira Abinader
4294b0f83a [core] mbgl::Image is now movable, noncopyable 2016-06-07 16:45:12 +03:00