John Firebaugh
e87a36444f
Move getMin/MaxZoom to TransformState
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
bcbb56c188
Maintain rotation when fitting to bounds
...
Also fit to the rotated bounds. A little more verbose than necessary due to <http://stackoverflow.com/a/2357688/4585461 >.
ref mapbox/mapbox-gl-js#1338
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
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
a8b6b67dfe
Introduce the ThreadContext
...
mbgl::Thread will keep a ThreadContext for each running instance
in a thread_local so we don't need to lookup a man in the Environment
every time we need some info about the current thread.
This patch is moving the ::currentlyOn check used on Debug build from
the Environment class to the ThreadContext.
2015-06-25 16:26:21 +03:00
John Firebaugh
a05698fe06
Remove MapData dependency from AnnotationManager
2015-06-24 13:08:37 -07: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
Thiago Marcos P. Santos
b09df7acb5
Cleanup the MapContext before the util::Thread destructor
...
The util::Thread will call the stop() method of the MapContext's RunLoop
which will wait for the pending tasks tied to it to complete.
If we have a request that is timeout'ing, this could mean a really long
wait. Instead, we now send a cleanup message that will reset all the
attributes first (canceling the pending requests) so the the MapContext
gets destructed quickly.
2015-06-04 14:44:34 +03: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
Konstantin Käfer
f4707f72e0
Replace mbgl::util::make_unique<> with std::make_unique<>
2015-05-26 17:57:38 +02:00
John Firebaugh
87b1da7611
DefaultFileSource has responsibility for handling mapbox:// URLs
2015-05-26 12:14:10 +02: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
Konstantin Käfer
27d8e82e1c
lower thread priority of worker threads
2015-05-04 17:33:05 +02: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
John Firebaugh
f8db45f19a
Move still image callback to MapContext
2015-04-28 14:32:25 -04:00
John Firebaugh
f0b229730f
Move style info to MapContext
2015-04-28 14:32:25 -04:00
John Firebaugh
b5b58086a8
Combine update and triggerUpdate
2015-04-28 14:32:25 -04:00
John Firebaugh
230027e514
Resize view from map thread
2015-04-28 14:32:24 -04:00
John Firebaugh
a625ba8a09
Remove Map::start/stop
...
Both Android and iOS now use pause/resume. The map thread is
always running, and be able to receive messages. When paused,
it will just refuse to render.
2015-04-28 14:32:24 -04:00
John Firebaugh
7cd55a3333
Enforce that transformState belongs to Map thread
2015-04-28 14:32:23 -04:00
John Firebaugh
6c7a01a503
Following kkaefer's view changes
2015-04-28 14:32:22 -04:00
John Firebaugh
75ae956b0e
WIP: Use Thread<MapContext>
2015-04-28 14:32:22 -04:00
John Firebaugh
41a44280ca
Prepare for using Thread<MapContext>
2015-04-28 14:32:22 -04:00
John Firebaugh
025eb013d7
Privatize remaining MapContext members
2015-04-28 14:32:21 -04:00
John Firebaugh
424dae0a2c
Move run() to MapContext
2015-04-28 14:32:21 -04:00
Konstantin Käfer
dae18cc7bc
remove some unused includes
2015-04-28 14:32:21 -04:00
Konstantin Käfer
6081941662
move uv version check to uv.cpp
2015-04-28 14:32:21 -04:00
Konstantin Käfer
b0a30943b4
move most private Map code to MapContext
2015-04-28 14:32:20 -04:00
Konstantin Käfer
9dc51e7f80
move rendering mode enum to MapData object
2015-04-28 14:32:20 -04:00
Konstantin Käfer
fa272b3aaa
move asyncRender to MapContext
2015-04-28 14:32:20 -04:00
Konstantin Käfer
f8600d8d97
move getSprite to MapContext
2015-04-28 14:32:20 -04:00
Konstantin Käfer
9580ec7b08
move Style to MapContext
2015-04-28 14:32:20 -04:00
Konstantin Käfer
f272d13dea
move worker to MapContext
2015-04-28 14:32:19 -04:00
Konstantin Käfer
67fa80f5e9
move MapContext to its own file
2015-04-28 14:32:19 -04:00
Konstantin Käfer
07525d5d50
move Sprite to MapContext
2015-04-28 14:32:19 -04:00
Konstantin Käfer
9af7af3109
move GlyphStore to MapContext
2015-04-28 14:32:19 -04:00
Konstantin Käfer
63acd5b0a1
move texturepool to context
2015-04-28 14:32:19 -04:00
Konstantin Käfer
9b64edd712
remove unused reference
2015-04-28 14:32:18 -04:00
Konstantin Käfer
ad0178fd45
move atlas/painter to map context
2015-04-28 14:32:18 -04:00
Konstantin Käfer
7c8c45edab
move activeSources to internal Map context
2015-04-28 14:32:18 -04:00
Konstantin Käfer
89167cbf8c
move Transform into MapData and make source unaware of the Map object
2015-04-28 14:32:18 -04:00
Konstantin Käfer
cc8f440c84
move TransformState to MapData object
2015-04-28 14:32:17 -04:00