Commit Graph

1181 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
ac9d5886f0 Added operator implementations for mbgl::Update enum class 2015-08-13 10:12:48 +03:00
Justin R. Miller
772238a229 fixes #2044: add -showAnnotations:animated: 2015-08-12 14:45:37 -07:00
Leith Bade
d4159d5141 Merge branch 'android-okhttp' 2015-08-12 14:58:33 +10:00
Konstantin Käfer
21ec505648 add benchmark mode that shows the real frame time rather than the vsync time 2015-08-11 16:40:40 +03:00
Leith Bade
0cbe7e07f5 Use OkHTTP to implement HTTPContext on Android.
Closes #823
2015-08-11 11:59:08 +10:00
Bruno de Oliveira Abinader
fa4636ffe4 Map::nudgeTransitions no longer depends on client information
Clients no longer need to provide data (eg. if gesturing or in a custom
animation) to Map::nudgeTransitions().

Upon MapContext::renderSync(), a new atomic bool 'needsRepaint' in MapData
allows thread-safe communication between Map and MapContext.
2015-08-05 15:19:00 +03:00
Bruno de Oliveira Abinader
492bcf0bd7 Added Update::Repaint 2015-08-05 15:19:00 +03:00
Konstantin Käfer
66f0473bcf add MBGL_USE_GLES2 define 2015-08-04 14:08:20 +02:00
Konstantin Käfer
78ec33320f don't use certain STL functions
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
2015-08-04 14:08:19 +02:00
Leith Bade
ab7456075c First pass at tidying up Android annotation code 2015-08-04 13:52:08 +10:00
Jason Wray
aa202f7e08 Add more mapView! 2015-07-31 16:18:43 -04:00
Jason Wray
57f0d6535c Document iOS region change delegate methods
With #1026 the region delegate methods work reliably and as expected. This commit adds `mapView:regionWillChangeAnimated:`, `mapViewRegionIsChanging:`, and `mapView:regionDidChangeAnimated:` to the official documentation.
2015-07-31 15:59:57 -04:00
Leith Bade
d57a02f3a9 First pass at updating JNI bindings
Hook up collisionDebug, isFullyLoaded, onLowMemory in Android
Rename class to styleClass in Java to match iOS
Fixed some formatting
Fixes #1905
Fixes #1946
Fixes #1263
2015-07-29 12:17:42 +10:00
Bruno de Oliveira Abinader
3512da9609 Avoid nudging transitions if a gesture is in progress
We're now using nudgeTransitions() to tell the Map view that we want to
update it. However, if we're on a gesture movement, the update() call
can get called too fast and causing general slowdown. This check ensures
we only call for nudgeTransitions() after all gesture events are
finished. Fixes the issue pointed out by #1548 on Android.
2015-07-23 17:43:05 +03:00
Bruno de Oliveira Abinader
38f3bed63e Export default transition delay in Map public API
Added a setter/getter for default transition delay, in the same fashion
as the default transition duration.

Spin-off from #1888. Fixes #302.
2015-07-21 18:02:09 +03:00
Bruno de Oliveira Abinader
784eb35512 Revert "Revert "split renderSync and transition nudging to allow client view syncing""
This reverts commit 263f9fad30.
2015-07-20 21:59:13 +03:00
Bruno de Oliveira Abinader
263f9fad30 Revert "split renderSync and transition nudging to allow client view syncing"
This reverts commit b8388168dd.

It seems 'nudgeTransitions()' is no longer necessary as #1548 has fixed the update issues.
2015-07-20 17:07:55 +03:00
Minh Nguyễn
1f78d28516 Merge branch 'release-v0.5.0' 2015-07-14 10:49:52 -07:00
Bruno de Oliveira Abinader
2aad2f4e14 Pass {Duration,TimePoint} by const ref if possible 2015-07-14 16:48:34 +03:00
Thiago Marcos P. Santos
d207166abe Remove unused function: cwd() 2015-07-11 12:42:45 +03:00
Justin R. Miller
3318a3ced0 refs #1859: use traditional struct declaration 2015-07-09 10:14:24 -07:00
Justin R. Miller
309eee35f3 refs #1859: use traditional struct declaration 2015-07-09 09:48:09 -07:00
Minh Nguyễn
184afb01ad Removed documentation for unavailable method
So it doesn’t show up in the generated docset.
2015-07-08 14:39:29 -07:00
Minh Nguyễn
8a971458a4 Removed documentation for unavailable method
So it doesn’t show up in the generated docset.
2015-07-08 13:49:07 -07:00
Justin R. Miller
b8388168dd split renderSync and transition nudging to allow client view syncing 2015-07-08 12:10:12 -07:00
Justin R. Miller
e0384a98f7 explicitly bring in header 2015-07-08 19:46:04 +02:00
Justin R. Miller
445d3afa4f fix nullability 2015-07-08 19:46:04 +02:00
Justin R. Miller
e3b823b11b nullability for MGLAnnotationImage 2015-07-08 19:46:03 +02:00
Justin R. Miller
5ab58deb44 Cocoa custom marker imagery API 2015-07-08 19:46:03 +02:00
Konstantin Käfer
62ac43a85b add ability to add random custom markers to test app 2015-07-08 19:46:02 +02:00
Konstantin Käfer
f9601ae685 add ability to set custom sprites on the Map object 2015-07-08 19:46:01 +02:00
Konstantin Käfer
6271f8e546 mark Image constructor as explicit to avoid accidental implicit argument conversion
when passing a std::string instead of an Image, the parameter gets implicitly and automatically converted (== parsed) to a temporary Image object. Since parsing an Image shouldn't be a frequent operation
2015-07-08 19:46:01 +02:00
Konstantin Käfer
55ef14f3a8 compress_png: void* => const void* 2015-07-08 19:45:59 +02:00
Konstantin Käfer
7f705da564 Sprite store API 2015-07-08 19:45:59 +02:00
Ansis Brammanis
888ae5ebdc improve round line joins for semi-transparent lines
https://github.com/mapbox/mapbox-gl-js/pull/1359

Round line joins used to be drawn by adding a semicircle cap to the end
of each segment. This looked fine for opaque lines not for
semi-transparent lines.

This changes the triangulation so that round line joins don't overlap
with segments. The gap between segments is filled with small triangles
that look like pie slices. The edge of the round linejoin is made up of
many short straight lines that look round at the sizes we draw lines.

Since sharp angles are infrequent, this does not significantly affect
the total number of triangles created.

Joins for angles that are really sharp are still drawn with overlap.
2015-07-08 16:16:51 +02:00
Konstantin Käfer
675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
Minh Nguyễn
46a6173bd7 [wrap)
If (wrap] is desired, it is the responsibility of the caller to handle the case in which min is returned.
2015-07-06 13:07:34 -07:00
John Firebaugh
5fadda53e5 Move WorkerTask functionality into RunLoop core
As a byproduct, this makes FileCache get requests properly
cancelable.
2015-07-01 15:21:10 -07:00
Justin R. Miller
76333dfc0c fixes #1770: rename & expose compass, logo, and attribution 2015-07-01 12:09:33 -04:00
John Firebaugh
6532438fe4 Rationalize *RenderingMap notifications 2015-06-30 10:13:24 -07:00
John Firebaugh
42c06e7039 Use array of structs rather than parallel arrays for annotations 2015-06-29 10:54:17 -07:00
Minh Nguyễn
ac2ad993a5 Fit to coordinates
Whoever determined the boundaries of the District of Columbia did not have fit-to-bounds implementations in mind. With this change, shapes that are not unrotated rectangles fit much, much better.
2015-06-26 21:46:15 -07:00
John Firebaugh
d193083513 Remove duration argument from View::notifyMapChange
Fixes #1026
2015-06-26 10:32:07 -07:00
John Firebaugh
07a6d2ef64 Move Transform from MapData to Map
Pass current state to MapContext where needed. Remove mutex from
Transform.
2015-06-26 10:32:07 -07:00
Konstantin Käfer
dca42018d2 drive Android rendering from the main thread via invalidate() calls 2015-06-26 10:32:06 -07:00
Konstantin Käfer
84e2ea886d drive map rendering from main thread 2015-06-26 10:32:06 -07:00
Konstantin Käfer
740281cc89 remove unused renderAsync() function 2015-06-26 10:32:06 -07:00
Minh Nguyễn
29fd554c32 Implemented -setVisibleCoordinateBounds:
Followup to #1783: Implemented the non-animated version of fit to bounds and makes it a KVO-compliant property.
2015-06-25 22:26:35 -07:00
Minh Nguyễn
1d11624efd Test fit to bounds; added MGLCoordinateBounds functions
Added a bunch of functions to work with MGLCoordinateBounds in a separate header analogous to MKGeometry.h. Added resolution-independent tests for common fit to bounds scenarios.
2015-06-25 21:54:57 -07:00
Minh Nguyễn
68e404c522 Fit to bounds with padding
Each side of the bounding box is specified independently, allowing more flexibility than the offset + padding construct supported in mapbox/mapbox-gl-js’ Camera.
2015-06-25 21:54:57 -07:00