Commit Graph

247 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
5db4670d78 [core] Added more transform state getters
Some platforms requires specific information that was previously not
available in public API, but stored internally in TransformState object.
2015-10-21 11:06:51 -07:00
John Firebaugh
c5b95032a5 [core] Annotation refactor 2015-10-20 13:54:19 -07:00
John Firebaugh
597b2b4851 [core] Pull annotation typedefs to own header; add AnnotationID 2015-10-20 13:54:19 -07:00
Leith Bade
b869771992 Correctly handle spurious wake-ups in Map::pause()
Fixes #2522
2015-10-06 14:10:32 +11:00
Mike Morris
b46c102eb0 mason variant@1.0 2015-09-30 15:34:40 -07:00
John Firebaugh
af392b9434 Rewrite annotation invalidation strategy
First, move style mutation code out of StyleParser and into AnnotationManager,
coalescing it with the mutation code for shape layers.

Second, allow AnnotationManager to keep track of stale tiles entirely
internally. There's no reason to pass sets of TileIDs around.

Third, correct the logic for invalidating the shape source. Since
AnnotationManager does not track shape invalidations on a tile-by-tile basis,
don't try to invalidate the shape source tile-by-tile.

Fixes #1675
Fixes #2322
Fixes #2095
2015-09-28 14:10:23 -07:00
Leith Bade
d2d3df2a69 Fix freezing on Android when rotating
Fixes #1941
2015-09-22 16:40:04 +10:00
Minh Nguyễn
0a172a21fd CameraOptions
Plumbed camera options all the way through to MGLMapView. Added a method that lets you specify a direction in addition to center point and zoom level.

Added Map::jumpTo() for parity with mapbox-gl-js. Replaced usage of Map::setLatLng() and Map::setLatLngZoom() with Map::jumpTo() or Map::easeTo() within MGLMapView. Replaced MGLMapView.pitch with MGLMapCamera for setting all supported degrees of freedom simultaneously. Simultaneously move and rotate with course.

Support customizable timing functions on iOS.

iosapp now persists an archived MGLMapCamera instead of separate viewpoint properties and also synchronizes user defaults on termination. This change implements persistence entirely in Objective-C, eliminating the use of the Objective-C++ implementation.

Fixes #1643, fixes #1834. Ref #1581.
2015-09-07 09:22:52 -07:00
Bruno de Oliveira Abinader
0ff7cf20e9 Get rid of MapData::{get,set}NeedsRepaint 2015-09-02 23:20:47 +03:00
Bruno de Oliveira Abinader
0b501e0566 Substitute nudgeTransitions with async view invalidation 2015-09-02 23:20:46 +03:00
John Firebaugh
abc1c84fb8 Merge branch 'master' into node 2015-08-31 16:45:21 -07:00
Mike Morris
4540c3c0e8 View::swap -> View::beforeRender View::afterRender
To be able to resize the framebuffer on the map thread
in HeadlessView.
2015-08-25 14:39:49 -04:00
Ansis Brammanis
14dee43a71 add map.setPitch(pitch) and map.getPitch() 2015-08-24 18:41:51 -04:00
Bruno de Oliveira Abinader
ac9d5886f0 Added operator implementations for mbgl::Update enum class 2015-08-13 10:12:48 +03: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
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
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
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
Justin R. Miller
b8388168dd split renderSync and transition nudging to allow client view syncing 2015-07-08 12:10:12 -07: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
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
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
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
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
Minh Nguyễn
c57799f26c Reimplemented fit to bounds
The new implementation is now public and takes advantage of MGLCoordinateBounds. It is re-ported from `Camera.prototype.fitBounds()` in mapbox/mapbox-gl-js to ensure correct behavior. A new function, MGLCoordinateBoundsMake(), makes it easier to create an MGLCoordinateBounds for use with this method.
2015-06-25 21:54:53 -07:00
Thiago Marcos P. Santos
07086981fe Get rid of Environment et al.
mbgl::Environment is not used anymore and can
removed.
2015-06-25 16:26:22 +03:00
Justin R. Miller
bd0bf294bf squash of #1655: shape annotations support for core & iOS 2015-06-15 18:30:39 -07:00
Minh Nguyễn
714b68f7b3 Revert "use array of structs rather than parallel arrays for annotations"
This reverts commit 2435c1ad26 (#1710), which needs to be revisited in light of #1655, which is a much higher priority at the moment.
2015-06-15 15:58:22 -07:00
Konstantin Käfer
2435c1ad26 use array of structs rather than parallel arrays for annotations 2015-06-11 17:26:37 -04:00
Ansis Brammanis
ff6a5ce5bc Merge remote-tracking branch 'origin/master' into new-labelling
Conflicts:
	src/mbgl/map/source.cpp
	src/mbgl/map/source.hpp
	src/mbgl/map/tile_data.cpp
	src/mbgl/map/tile_parser.cpp
	src/mbgl/map/vector_tile_data.cpp
	src/mbgl/renderer/painter.cpp
	src/mbgl/renderer/symbol_bucket.cpp
	src/mbgl/text/glyph.hpp
	src/mbgl/text/glyph_store.cpp
	src/mbgl/text/placement.cpp
	test/suite
2015-05-28 20:01:15 -04:00
Ansis Brammanis
8962442b1b make collision debug boxes toggleable 2015-05-28 19:17:07 -04:00
John Firebaugh
87b1da7611 DefaultFileSource has responsibility for handling mapbox:// URLs 2015-05-26 12:14:10 +02:00
Thiago Marcos P. Santos
da81211fea Add callback for error notifications on renderStill()
The callback will be called when any of the resources requested
from the network failed to load.

There is not recovery implemented yet, so the closest thing to
reseting the Map object and reloading all the resources would
be setting a new style.
2015-05-22 10:44:18 +03:00
John Firebaugh
386be7c0fa Remove unused
There are no longer any requests made that don't have a run loop to
dispatch back to.
2015-05-13 13:54:16 -07:00
Leith Bade
703e0bc2ee Ignore deactivate when no valid EGL display. Fixes #1435
Initialise NativeMapView's EGL variables before Map

Fix hang

Add check for double pause

Add test for double pause
2015-05-09 12:02:39 +10:00
Konstantin Käfer
691c305467 add Map::isFullyLoaded()
returns whether the Map is still loading/parsing any assets or whether everything is there and a render will likely be complete
2015-05-05 11:47:23 +02:00
John Firebaugh
00a1f44cfc Ensure no GL commands are executed after pause 2015-05-04 18:27:48 -07:00
John Firebaugh
8bb7fc64ff Move Environment to MapContext 2015-04-28 14:32:25 -04:00
John Firebaugh
3bf0bf9538 Remove unused includes 2015-04-28 14:32:25 -04:00