John Firebaugh
76d6aba8f2
[core] Define mbgl::variant ( #4833 )
...
For parallelism with mbgl::optional, and to avoid exposing namespaces other than `mbgl` in the public API.
2016-04-25 13:58:10 -07:00
John Firebaugh
c1f40b9e71
[core] Move enum type classes to implementation ( #4831 )
2016-04-25 13:34:41 -07:00
John Firebaugh
c4089b60bc
[core] Extract Function::evaluation to a separate class ( #4811 )
...
This allows the Function<Faded<T>> partial specialization to be eliminated, giving all property functions a consistent storage type.
2016-04-25 09:51:47 -07:00
Minh Nguyễn
466ed55200
[core, ios, osx] cameraThatFitsCoordinateBounds
...
Added an API to get a camera that you can pass into -[MGLMapView setCamera:] that fits the given coordinate bounds, by analogy with -[MKMapView regionThatFits:] or -[MKMapView mapRectThatFits:edgePadding:].
Added mbgl::Map::getCameraOptions() for getting the current camera options more conveniently.
2016-04-22 16:39:25 -07:00
John Firebaugh
5939dd5b41
[core] Use the proper type for font stacks
2016-04-22 15:53:18 -07:00
John Firebaugh
2ea450205d
[core] PlacementType ⇢ SymbolPlacementType
2016-04-21 14:05:40 -07:00
John Firebaugh
2df1c36ab8
[core] JoinType ⇢ LineJoinType
2016-04-21 14:05:40 -07:00
John Firebaugh
a14f0d2edd
[core] CapType ⇢ LineCapType
2016-04-21 11:01:56 -07:00
Bruno de Oliveira Abinader
7821e21631
[core] Fix compilation warning
2016-04-20 20:55:51 +03:00
John Firebaugh
ce4270b01c
[core] Convert MapContext to Map::Impl; eliminate indirection
2016-04-15 09:56:18 -07:00
Ansis Brammanis
d2b9b1c348
[core] always set activeTexture before binding a texture
2016-04-14 17:12:56 -07:00
John Firebaugh
6d88a23a60
[core] Remove internal threading from OnlineFileRequest
...
There's no need to do the work that OnlineFileRequest does on a separate thread from the DefaultFileSource thread, and having AsyncTasks proxy to other tasks across a thread boundary adds needless complexity.
2016-04-14 14:18:19 -07:00
John Firebaugh
204c7fee03
[core] Render from the main thread
...
Do not create a thread for the MapContext anymore.
2016-04-14 13:44:08 -07:00
John Firebaugh
a47ab85283
[core] Don't put static objects in a header file ( #4707 )
...
This causes duplicate objects -- one for every file that includes that header.
2016-04-14 12:11:02 -07:00
Thiago Marcos P. Santos
74a1d3c164
[android] Introduce RunLoop based on Looper
...
Also implement a Timer and AsyncTask based on Android's Looper.
2016-04-06 04:52:51 -03:00
John Firebaugh
77b0723476
[ios, osx, linux] Remove unused "applicationRoot" function
2016-03-31 17:08:00 -07:00
John Firebaugh
5eda74a514
Merge branch 'release-ios-3.2.0-android-4.0.0'
2016-03-30 17:43:37 -07:00
John Firebaugh
7b5a1ca167
[core] Localize and simplify state for MapChangeDidFinishLoadingMap event
...
Only Map needs to track this state, and it can simply be set when beginning to load a style and reset when finished.
2016-03-30 13:53:31 -07:00
John Firebaugh
169755e89a
[core] Unify FileRequest and WorkRequest
2016-03-24 10:54:32 -07:00
Konstantin Käfer
61920071cd
[core] split headless_view.cpp into implementation-specific files
...
also adds a EAGL implementation for iOS
2016-03-22 11:56:01 -07:00
Konstantin Käfer
1dd81d9776
[test] remove crc64 and compare images
...
boost's crc64 breaks on iOS
2016-03-22 11:56:01 -07:00
Thiago Marcos P. Santos
baf30cd1f7
[glfw] Main loop integration
...
This new code can be used for rendering on the Main thread
while it will also work for rendering on the Map thread
before we make the switch. Needed by #2909 .
2016-03-21 23:58:48 -03:00
Bruno de Oliveira Abinader
c6ba05bbc3
[core] Default fade duration is now a constant
2016-03-18 01:27:47 +02:00
Bruno de Oliveira Abinader
8f96dea822
[core] Remove default transition duration
2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
f736e46ca4
[core] s/Update::Zoom/Update/RecalculateStyle/
2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
4909169996
[core] Added user-defined transition properties when modifying classes
2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
94de5d7f4a
[core] Remove MapData::defaultTransitionDelay
2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
ac70ada2d3
[core] Check for NaNs in mbgl::util::{min,max,clamp}
2016-03-18 00:53:14 +02:00
John Firebaugh
46830f1ea5
[core] Assert and guard against null std::exception_ptr in toString
...
We don't expect toString to be called with a null std::exception_ptr. But if it is, we'd prefer not to terminate the process in release builds.
2016-03-16 11:04:08 -07:00
Konstantin Käfer
ee651d7832
[core] use constexpr constants
2016-03-16 14:46:59 +01:00
Bruno de Oliveira Abinader
b5bb48edaa
[core] Simplify LatLng::unwrapForShortestPath usage
...
Simplify LatLng::{wrap,unwrapForShortestPath} code, avoiding duplicated
code between Transform::{latLngToScreenCoordinate,easeTo,flyTo}.
Added unit tests for camera usage in Transform to detect cases like e.g.
crossing the antimeridian as a shortest path between two coordinates.
Transform::flyTo precision loss to be handled in #4298 .
2016-03-14 11:45:31 +02:00
Bruno de Oliveira Abinader
fe7e208b42
[core] Implement LatLng::null()
2016-03-13 21:38:20 +02:00
Bruno de Oliveira Abinader
8e30a4a080
[core] Harden Transform anchor & padding usage
...
Use optional values for anchor & padding in Map and Transform functions
instead of NaNs. Added unit tests to stress some edge cases.
2016-03-13 21:38:20 +02:00
Bruno de Oliveira Abinader
3879bc6a4e
[core] Make vec{2,3,4} operator bool explicit
2016-03-11 02:24:09 +02:00
Bruno de Oliveira Abinader
b33b2f1515
[core] Check for NaNs in EdgeInsets
2016-03-10 03:36:46 +02:00
Bruno de Oliveira Abinader
d300f341bc
[core] Remove _validPoint from Transform code
...
vec2<T>::operator bool() checks for NaNs already.
2016-03-10 03:36:46 +02:00
Bruno de Oliveira Abinader
026b6d4c01
[core] Coordinate wrapping fixes
...
- Make returning LatLngs unwrapped by default.
- PointAnnotation and ShapeAnnotation are always wrapped so they can be
selected via intersection from the visible tile boundaries.
- Fixes LatLng::wrap() calculation.
- Fixes LatLng::unwrapForShortestPath() calculation.
The new unwrapForShortestPath algorithm unwraps the start coordinate
either forwards or backwards depending on the end coordinate value, so
we can always cross the antimeridian when needed and still obtain a
wrapped end coordinate in the end.
Fixes #4214 .
2016-03-10 03:36:45 +02:00
Thiago Marcos P. Santos
b8b283588f
[core] Remove goOffline() from DefaultFileSource
...
Use the newly added NetworkStatus::Set().
2016-03-08 10:31:01 -03:00
Thiago Marcos P. Santos
fa7c40c37f
[core] Add client defined network status
...
This API will let the client force a network status. If set
to Offline, we won't make network requests.
When set make to Online, it will trigger the pending requests
and try to fetch tiles from the network.
2016-03-08 10:31:01 -03:00
Konstantin Käfer
8112ac3371
[core] explicitly initialize a few fields to null
2016-03-04 16:01:41 -08:00
Bruno de Oliveira Abinader
fd123de8ad
[core] Regression fix in LatLng::unwrapForShortestPath
...
When porting this from Transform::unwrapLatLng, I forgot to check for
the second alternative.
Fixes #4174 .
2016-03-03 00:38:21 +02:00
Bruno de Oliveira Abinader
9346a6d038
[core] Avoid precompute overscaling for TileID
...
Plus type change for zoom and removed redundant inlines.
2016-03-01 21:39:36 +00:00
Bruno de Oliveira Abinader
c6757b9a9b
[core] Added DEGREES_MAX as constant value
2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
abe3f9ce7a
[core] Moved wrapping to LatLng scope
...
Fixes a precision loss when converting unwrapped LatLngs.
2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
4994b3dc57
[core] PrecisionPoint is now ScreenCoordinate
2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
1d984d2bb2
[core] Get rid of mbgl/util/vec4 - use vec4 from vec.hpp instead
2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
f3fc87261c
[core] Coordinate is now GeometryCoordinate
...
Also introduced GeometryCoordinates (vector of GeometryCoordinate
items), to better cope with GeometryCollection.
2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
411a562061
[core] Enforce constants usage
...
Use 'LATITUDE_MAX', 'LONGITUDE_MAX', 'DEG2RAD' and 'RAD2DEG' whenever
possible.
2016-03-01 20:58:54 +00:00
Thiago Marcos P. Santos
f683b10e10
[core] Build fix
...
Fix no viable conversion on OSX.
2016-02-26 04:21:28 +02:00
Thiago Marcos P. Santos
59a45b8400
[core] Add timeout for clock skew
...
If the server keeps sending replies considered from the client in the
past (there is no way to tell if the server or client clock is wrong),
the client will try to interpolate a valid expiration time based
on the delta of the expiration intervals sent by the server.
If the intervals are always the same, exponential backoff kicks in
until we get a different expiration time from what we already have.
2016-02-26 03:52:02 +02:00