Commit Graph

8025 Commits

Author SHA1 Message Date
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
Bruno de Oliveira Abinader
680fcd09b1 Revert "[core] Use release() instead of get()/reset() in Raster"
No one owned the data after release(), so this wasn't being free'd.
reset() does that, thus this patch causes a huge memory leak.
2016-06-07 16:14:42 +03:00
Bruno de Oliveira Abinader
269124ec26 [core] Include type in #pragmas
Part of https://github.com/mapbox/mapbox-gl-shaders/pull/13.
2016-06-07 15:04:02 +03:00
Bruno de Oliveira Abinader
8b28b6ab6b [core] Renamed OutlineShader's color uniform
Part of https://github.com/mapbox/mapbox-gl-shaders/issues/8.
2016-06-07 15:04:02 +03:00
Konstantin Käfer
aa88ca4757 [core] remove unused code 2016-06-07 13:55:35 +02:00
Bruno de Oliveira Abinader
83d349ee16 [core] Use RAII for TexturePool textures
TexturePool now disposes acquirable ids via SharedTexture, which
guarantees that these are going back to TexturePool once released.
2016-06-07 13:01:58 +03:00
Bruno de Oliveira Abinader
858311d19b [core] Do not expose TexturePool::Impl
Now using the same Pimpl mechanism from mbgl::Map.
2016-06-07 13:01:58 +03:00
Bruno de Oliveira Abinader
5e6f8d4ce5 [core] Use initializer list for Unique* objects 2016-06-07 13:01:58 +03:00
Minh Nguyễn
b761aad4e6 [ios] Bring annotation view to front when selected
Fixes #991.
2016-06-07 00:53:10 -07:00
Minh Nguyễn
b3d9e125b1 [ios] Avoid adding icon when relocating annotation
Fixed an issue that caused a default annotation icon to appear beneath an annotation view when relocating the annotation.
2016-06-06 16:00:45 -07:00
Minh Nguyễn
654f015639 [ios] Removed unused annotation image code
Removed unused annotation image code from iosapp, now that bulk-added point annotations are backed by annotation views.
2016-06-06 16:00:45 -07:00
Minh Nguyễn
62149410fa [ios, osx] Ignore multipoints
Ignore multipoints (as opposed to polylines and polygons) when adding annotations, just like we ignore multipolylines, multipolygons, and shape collections.

In osxapp, break multipoint features into points before adding them as annotations.
2016-06-06 15:40:52 -07:00
Young Hahn
126f388fdb Update shaders hash (#5261) 2016-06-06 17:54:07 -04:00
John Firebaugh
47d6903f4e [core] Revert line-round-limit default to 1 (#5260)
Refs #5258, #5234.
2016-06-06 12:45:40 -07:00
Thiago Marcos P. Santos
313d9ce09c [core] log2 polyfill for ARMv5
ARMv5 doesn't have a FPU and apparently the soft code for log2()
is wrong and giving weird results. log() works, so we use a log()
based log2() implementation for ARMv5.
2016-06-06 22:19:25 +03:00
Thiago Marcos P. Santos
7b8698b47a [core] Naive atomic type for ARMv5
std::atomic<bool> is implemented lock free which doesn't work
on ARMv5 and seems like the compiler is generating bogus code.

This workaround is a naive implementation using regular mutexes.
2016-06-06 22:19:25 +03:00