Commit Graph

2284 Commits

Author SHA1 Message Date
Ansis Brammanis
e7742f2fe9 [core] get rid of empty buffer warning
fix #3148
2016-04-04 22:35:56 -07:00
Konstantin Käfer
65acf35dcf [core] fix various compilation issues 2016-04-04 16:20:04 -07:00
Ansis Brammanis
415ea295c5 [core] make sprite metrics checking stricter
- check that sprite metrics are within the bounds of the sprite. fix #714
- make sprite metrics problems Errors instead of Warnings
- check for negative image width, height
2016-03-31 10:27:42 -07:00
Ansis Brammanis
273600c16e [core] simplify conversions from pixels to tile units
fix #3768
2016-03-30 18:53:44 -07:00
John Firebaugh
5eda74a514 Merge branch 'release-ios-3.2.0-android-4.0.0' 2016-03-30 17:43:37 -07:00
Ansis Brammanis
b6a181097c [core] fix reparsing overscaled geojson tiles
fix #3838
2016-03-30 13:57:47 -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
Ansis Brammanis
8e9e779f2f [core] fix line-dasharray/long-segment render test
fix #3928

reduce LineAtlas width to 256 to match -js. 256 should be enough.
2016-03-30 13:13:54 -07:00
Ansis Brammanis
387f37d035 [core] increase geojson buffer size to match -js 2016-03-30 13:13:53 -07:00
Ansis Brammanis
0539f7b4cb [core] fix infinite loop in mbgl::resample
fix #4416
2016-03-29 11:38:35 -07:00
Ansis Brammanis
fb15582d53 [core] fix background-pattern rendering in perspective view
fix #3801
2016-03-29 11:19:47 -07:00
Ansis Brammanis
6fcc7ba513 [core] fix circle rendering in still mode
fix #3764
2016-03-29 10:10:48 -07:00
Ansis Brammanis
3cc55a9dac [core] pack extrude and line distance into unsigned byte
instead of a signed byte. It's a bit easier to understand.

6c29251b35
2016-03-28 17:44:42 -07:00
Ansis Brammanis
196b7903d1 [core] remove flip from LineBucket.addLine
port dc036bcb3c
2016-03-28 17:44:41 -07:00
Ansis Brammanis
930c3c46c5 [core] reset line distance when it is near max
port 77ce4b45b2

fix #4492
2016-03-28 17:44:41 -07:00
Ansis Brammanis
b352bb81d8 [core] fix background-pattern rendering in perspective view
fix #3801
2016-03-28 16:59:39 -07:00
Bruno de Oliveira Abinader
3afdfc15a1 [core] FrameHistory cleanups 2016-03-24 22:02:30 +02:00
Bruno de Oliveira Abinader
fe1b417d04 [core] Update time point in map context on every update
Previous behavior prevented view from notifying when map was fully
loaded, because the style sources relies on a future time point for
checking if their tiles are updated. This was first caught only in still
mode, but also happens in continuous mode for platforms that rely on
View::notifyMapChange for updating the view.
2016-03-24 22:02:30 +02:00
John Firebaugh
169755e89a [core] Unify FileRequest and WorkRequest 2016-03-24 10:54:32 -07:00
John Firebaugh
2f9e6f4e94 [core] Allow the use of special characters in property field names
Fixes #4336
2016-03-23 17:15:18 -07:00
Ansis Brammanis
666c2658b8 upload new symbol buffers in upload pass
fix #4131
2016-03-22 12:58:41 +02: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
John Firebaugh
ca8212de92 [all] Set maximum maxZoom to 21
Numbers greater than 21 trigger various bugs.
2016-03-21 16:38:54 -07:00
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