Commit Graph

2261 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
cd1a06c2dc [core] Get rid of MapData::{get,set}animationTime 2016-03-18 01:27:48 +02: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
aa530d2bea [core] Cleaned up duplicate code in MapContext 2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
01edd4503c [core] Move class handling to Style 2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
c561ea5d05 [core] Check for NaNs in mbgl::util::{min,max,clamp} 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
Konstantin Käfer
ee651d7832 [core] use constexpr constants 2016-03-16 14:46:59 +01:00
Bruno de Oliveira Abinader
fc0a0ef98a [core] Always return wrapped coordinates
This fixes an issue in both iOS and Android when e.g. adding a marker on
both sides of the dateline border in Taveuni island, the marker in one
of the sides would have an out-of-bounds longitude.
2016-03-14 12:16:55 +02:00
Bruno de Oliveira Abinader
78a12d9d47 [core] Ignore shortest path when gesturing in Transform::easeTo
If gesture in progress, we transfer the world rounds from the end
longitude into start, so we can guarantee the "scroll effect" of
rounding the world while assuring the end longitude remains wrapped.
Otherwise, find the shortest path.
2016-03-14 11:51:37 +02: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
John Firebaugh
c39bd344b5 [core] Set mapbox::DEFAULT_OFFLINE_TILE_COUNT_LIMIT to 6000 2016-03-11 16:36:58 -08:00
Bruno de Oliveira Abinader
694a064cdd [core] Fix non-anchored Transform::setAngle
This reverts a line change from b33b2f15, because we explicitely want
the anchor to be invalid.
2016-03-11 16:53:36 +02:00
Bruno de Oliveira Abinader
f73beb5913 [core] Fix screen coordinates when crossing the antimeridian (#2)
Added missing case. Really fixes #4155 this time.
2016-03-11 12:34:21 +02:00
Bruno de Oliveira Abinader
1a4b8f3e2f [core] Fix screen coordinates when crossing the antimeridian
If the center and point coordinates are not in the same side of the
antimeridian, we need to unwrap the point longitude to make sure
it can still be seen from the visible side of the antimeridian that is
opposite to the center side.

Fixes #4155.
2016-03-10 14:00:42 +02:00
Bruno de Oliveira Abinader
7dde622db1 [core] Extra checks in Transform 2016-03-10 03:36:47 +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
e8d1276bb1 [core] Added Transform::getScreenCoordinate 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
dc2853533f [core] Fixes point annotations misplaced on maximum scale 2016-03-10 03:36:45 +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
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
15bc11ab23 [core] cancel TileID::overscaling() 2016-03-08 13:34:17 +01:00
Konstantin Käfer
8112ac3371 [core] explicitly initialize a few fields to null 2016-03-04 16:01:41 -08:00
Henry Dooley
cf4dddd1b9 Fixes an issue where rendering without Vertex Array Objects would cause a massive slowdown in the driver on Nvidia hardware. Unconfirmed if the issue is present on other GPUs. 2016-03-04 10:23:09 -08:00
Bruno de Oliveira Abinader
7ced8e97ba [core] Reset pitch in Map::resetPosition 2016-03-03 17:02:15 +02:00
Bruno de Oliveira Abinader
bb434aa9e4 [core] Use TransformState::worldSize() whenever possible 2016-03-03 17:02:15 +02:00
Bruno de Oliveira Abinader
27b798da91 [core] Simplify TransformState::moveLatLng 2016-03-03 17:02:15 +02:00
Bruno de Oliveira Abinader
8944e2c588 [core] Replaced raw values with util::tileSize 2016-03-03 17:02:15 +02:00
Bruno de Oliveira Abinader
877adedb0f [core] Fix style cascade loop when transitioning 2016-03-03 15:47:03 +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
fde0ab98ee [core] Moved TileCoordinate to tile cover scope 2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
6e6d91478e [core] Cleared TileCoordinate from Painter 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
b325df880b [core] Simplify Screen to Geometry coordinate conversion 2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
9771b0e569 [core] Use GeometryTileFeature::defaultExtent by default
GeoJSONTile and AnnotationTile don't need to reimplement getExtent() if
they use the same default value. This also helps point and shape
annotations to avoid using raw values.
2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
fcaafcc428 [core] Replace std::array<double, N> usage in SourceInfo 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
1ce99d2d7b [core] Explicit instantiate vec{2,3,4}<double> 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
Bruno de Oliveira Abinader
9955087767 [core] Fix potential precision data loss 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