Commit Graph

6225 Commits

Author SHA1 Message Date
Brad Leege
8f532eeefa [android] #3358 - Making Core GL camera methods private. Adding moveCamera() API method. Updating CameraActivity to use only animateCamera() and moveCamera() API. 2015-12-20 09:19:03 -06:00
Tobrun
f3de446bd9 [android] #3304 - refactor SpriteFactory to IconFactory, changed all the sprite names to icon for convention 2015-12-20 11:57:36 +01:00
Minh Nguyễn
70ae0cc172 [ios, osx] Allow zero-duration flight
For consistency with -setCamera:…, a duration of 0 jumps instantaneously to the new location, while a negative value uses the distance-dependent default.

Due to the produced curve and applied easing, flyTo() doesn’t model a parabola or ballistic trajectory, but it does simulate powered flight to some extent.
2015-12-19 20:48:34 -08:00
Minh Nguyễn
d1d96dfe91 [core] Reformulated flyTo options
The speed and curve fields in CameraOptions have been replaced with velocity and minZoom fields, which expressed in screen units. Scaling and easing make it difficult to derive options that are expressed in physical units.
2015-12-19 20:48:34 -08:00
Minh Nguyễn
225a17d775 [core] Fly across the meridian or antemeridian, whichever is shorter
ref mapbox/mapbox-gl-js#1853
2015-12-19 20:48:34 -08:00
Minh Nguyễn
a68589b6c7 [core] Refined and commented flyTo
Rewrote the flyTo implementation to more closely match GL JS’s implementation and the paper on which it is based.

Rewrote CameraOptions documentation. Only document units for generic types like double. The semantics of LatLng and Duration are already baked into the types; one just needs to look up the types’ definitions. Also, the […) is set notation, so the braces are supposed to be mismatched.

Fixes #3296.
2015-12-19 20:48:34 -08:00
Brad Leege
925687ab06 [android] #3244 - Removing debug log statements 2015-12-18 14:39:02 -06:00
Brad Leege
f7d1a40350 [android] Camera API 2015-12-18 11:33:40 -08:00
John Firebaugh
e2ad0e008a [core] Fix background-pattern origin
Regressed in 6e41664cb0. This restores it
to the same behavior as gl-js, backed by test-suite tests.
2015-12-18 10:46:10 -08:00
Tobrun
b8aee77299 [android] #3107 - allow other type of drawable to be used from a resource drawable other than BitmapDrawables 2015-12-18 15:47:54 +01:00
Tobrun
f31ff44d79 [android] #3317 #3239 - SpriteFactory Singleton, added different custom markers to InfoWindowActivity 2015-12-18 09:03:13 +01:00
Oguz Babaoglu
9e90934438 [Android] MapFragment null container fix 2015-12-18 08:10:47 +01:00
Tobrun
5c4ac72d5a [android] #3277 - update android support lib + new configuration to manage these 2015-12-18 08:00:07 +01:00
Bruno de Oliveira Abinader
3e00ab1582 [core] Add more tests to on-demand source load 2015-12-17 18:15:06 -08:00
Bruno de Oliveira Abinader
9d3fe01991 [core] Tests for style with unused sources 2015-12-17 16:53:37 -08:00
Bruno de Oliveira Abinader
93725e062a [core] Load sources only if there is at least one visible layer 2015-12-17 16:53:37 -08:00
Bruno de Oliveira Abinader
5a63ce5576 [core] Avoid loading source if a source request is currently ongoing 2015-12-17 16:53:37 -08:00
John Firebaugh
bf37904883 [core] Unbind current VAO before calling custom layer render function 2015-12-17 15:15:55 -08:00
John Firebaugh
fd248c1894 [core] Don't crash when destroying a copied CustomLayer 2015-12-17 15:15:55 -08:00
John Firebaugh
110f1ec796 [ios, android] Add methods to remove a custom layer 2015-12-17 15:15:55 -08:00
Minh Nguyễn
d3c92a8b5c [osx] Fixed path to embedded framework
Xcode (or perhaps gyp’s Xcode adapter) doesn’t understand \$ inside a copy files run phase path.

ref #3337
2015-12-17 13:15:43 -08:00
Bruno de Oliveira Abinader
c08a97e453 [osx] Fixed 'make compdb' target'
[skip ci]
2015-12-17 12:28:36 -08:00
Minh Nguyễn
986e0ae39e [core] Added special case for atomic flyTo()
startTransition isn’t well-suited to atomic transitions, which are expected to be synchronous and end up at the final state.
2015-12-17 10:24:58 -08:00
John Firebaugh
a7e4e6bb1c [ios] Move source to src folder, matching osx 2015-12-17 10:16:22 -08:00
John Firebaugh
7a4e7376e1 Move platform scripts into platforms 2015-12-16 17:49:22 -08:00
Thiago Marcos P. Santos
a903d2eef0 [glfw] Set viewport size from the Map thread
Setting the viewport size from the main thread has no affect
on Linux and thus, the map doesn't scale. We now set the
viewport size on the beforeRender() hook that gets called
from the Map thread.
2015-12-16 17:18:54 -08:00
John Firebaugh
9f18ed9a3c [android] Add CustomLayerRenderParameters to example code 2015-12-16 16:30:30 -08:00
Minh Nguyễn
bf89ed080b [ios] Renamed custom style layer invalidation method
Cf. -[UIView setNeedsDisplay] and -[MKOverlayRenderer setNeedsDisplay].
2015-12-16 16:15:28 -08:00
John Firebaugh
2ee52915fe [ios, android] Add a method to invalidate custom layers, forcing a repaint 2015-12-16 16:15:28 -08:00
John Firebaugh
2b782308e5 [android] Simplify structure for native files 2015-12-16 16:06:45 -08:00
John Firebaugh
989690c4af [ios] Remove vestigial environment variables from .travis.yml 2015-12-16 15:53:23 -08:00
Minh Nguyễn
304b4ec664 [ios] Silence undocumented typedef warnings from appledoc
ref #3203
2015-12-16 15:48:55 -08:00
Minh Nguyễn
ff928a3013 [ios] Fixed off-by-one error due to merge
This needs to be converted into a giant switch statement, but that wouldn’t prevent issues like this cropping up in a merge anyways.
2015-12-16 15:48:55 -08:00
Minh Nguyễn
350cafb903 Revert "Revert "[ios] Custom style layer""
This reverts commit 081e4e4451.
2015-12-16 15:48:55 -08:00
John Firebaugh
13d5b18eba [android] Move into platform subdirectory 2015-12-16 14:52:29 -08:00
John Firebaugh
0db9f229f2 [android] Move includes to platform subdirectory 2015-12-16 14:52:29 -08:00
Antonio Zugaldia
c23e8cc748 [android] Fix 2-finger rotation is off axis
Fixes #3325
2015-12-16 17:21:49 -05:00
John Firebaugh
081e4e4451 Revert "[ios] Custom style layer"
ec9a4cd328
2015-12-16 14:05:54 -08:00
Mike Morris
4dac6cde30 node-v2.2.0 2015-12-16 15:13:20 -05:00
Minh Nguyễn
ec9a4cd328 [ios] Custom style layer
Exposed Map::addCustomLayer() publicly as an undocumented, block-based API. This change avoids the terms “layer”, “initialize”, “render”, and “altitude” because they overload existing terminology in the SDK, UIKit, or MapKit. (“Layer” is qualified as “style layer”.) There are outstanding questions about ARC memory management, but this approach works in both Objective-C and Swift for pure OpenGL programming.

Added a demo to iosapp that draws a green layer below any labels in Mapbox Streets.
2015-12-16 11:03:54 -08:00
John Firebaugh
8a17d30c50 [android] Custom layer bindings 2015-12-16 11:03:32 -08:00
Minh Nguyễn
e304033552 [core] Fixed annotation icon replacement
Another pass at #3146, including a unit test.
2015-12-15 21:04:15 -08:00
Thiago Marcos P. Santos
0f37b670ba [core] Do not use std:: namespace for log2()
As some versions of libstdc++ don't have it.
2015-12-15 18:23:45 -08:00
John Firebaugh
dc4fa1c52e [android] Add scheduled build script 2015-12-15 16:52:37 -08:00
Minh Nguyễn
82a5575513 [ios] Updated changelog 2015-12-15 16:36:17 -08:00
Romain Quidet
b8be1f0632 code review updates: sprite_atlas brackets and nullable removed for reuseIdentifier of annotationImage 2015-12-15 16:36:17 -08:00
Romain Quidet
af45d87e54 2210: Sprites can be removed / updated correctly 2015-12-15 16:36:17 -08:00
Romain Quidet
02a32b55e4 2210: MGLAnnotationImage image can be update 2015-12-15 16:36:17 -08:00
John Firebaugh
9d0ab5549c [ios, android] Remove unnecessary portions of bitrise.yml 2015-12-15 14:29:33 -08:00
John Firebaugh
cf4f262df5 [ios, android] Remove version specifier to avoid Bitrise upgrade nag 2015-12-15 14:19:51 -08:00