John Firebaugh
9b62661b07
[core] Use experimental optional instead of mapbox::util::optional
2016-01-19 17:56:48 -08:00
John Firebaugh
6709bdcacd
Revert WebP support due to broken builds
...
This reverts commits 2010fbb0e6 , a361ce47a1 , and d004bb275a .
2016-01-19 13:34:56 -08:00
Bruno de Oliveira Abinader
2010fbb0e6
[linux] Replace PNG with WebP on tile source URL
...
This is a hack, in the same fashion as adding {ratio} to the tile URLs.
We should update the raster tile sources to use WebP by default.
2016-01-19 16:06:37 +02:00
Bruno de Oliveira Abinader
a361ce47a1
[linux] Added WebP tile support
...
- Android support is currently disabled due to a libwebp build issue.
- iOS and OS X support will appear after the next Mapbox iOS SDK release.
Related: #https://github.com/mapbox/mapbox-gl-native/issues/2354
2016-01-19 16:06:36 +02:00
Minh Nguyễn
143f8a7817
[core] Added padding option to CameraOptions
...
Moved EdgeInsets to geo.hpp so CameraOptions and Transform can refer to it. Added a padding option to CameraOptions that alters the frame of reference for the center option. Added optional padding parameters to LatLng getters and setters.
Working towards #2600 .
2016-01-18 16:54:57 -08:00
Minh Nguyễn
8bad15bf87
[core] Consolidated zoom and angle anchor logic
...
Made anchor a CameraOption for easeTo().
2016-01-14 00:40:03 -08:00
Ansis Brammanis
e577354567
[core] remove bilinear, nearest scaling, fix #3164
2016-01-13 15:02:41 -08:00
Konstantin Käfer
62973f9e5a
[core] move raster tile URL normalization to source parsing
2016-01-13 13:04:59 -08:00
Thiago Marcos P. Santos
d7fdcc73bf
[core] Get rid of ::unref() for Timer and AsyncTask
...
Not need, legacy from libuv. The RunLoop keep the main
loop running until is explicitly no longer needed.
2016-01-09 01:26:29 +02:00
John Firebaugh
4b7db28157
[tests] Test that Timer::stop on a stopped timer is a no-op
2016-01-08 12:23:48 -08:00
John Firebaugh
7a6076ea9d
[tests] Test with OnlineFileSource
...
When we introduce OfflineFileSource, the behavior of existing tests should
not change.
2015-12-23 14:55:12 -08:00
Thiago Marcos P. Santos
373916420a
[tests] Create less threads on the AsyncTask tests
...
So we open less fds as new versions of OSX have
a smaller limit (256).
2015-12-21 22:22:11 +02:00
Konstantin Käfer
95cef66e22
[core] change RapidJSON usage to use CrtAllocator and bump GeoJSON VT
2015-12-14 16:43:35 -08:00
Thiago Marcos P. Santos
37ca365469
[tests] Force classic locale on toString tests
...
Fix an issue where the test result can be affected
depending on the current locale settings of the
machine running the tests.
2015-12-10 18:25:51 -08:00
John Firebaugh
e04c5f6506
[core] Replace StyleLayerType with RTTI
2015-12-07 18:22:33 -08:00
Konstantin Käfer
d5fb535058
[core] add namespace comment to closing brace
2015-12-03 15:38:36 +01:00
Konstantin Käfer
6feb89cbbc
[core] fix various errors reported by clang-tidy
2015-12-03 15:38:36 +01:00
John Firebaugh
58886842bc
[core] Move MapData storage to MapContext
...
This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
2015-12-01 09:15:05 -08:00
John Firebaugh
f27c28b6c4
Partially revert "[core] Source should receive a ref to MapData just once"
...
This partially reverts commit d55aa7929c .
2015-12-01 09:07:03 -08:00
Thiago Marcos P. Santos
8d3fd199b2
[tests] Add utests for ThreadLocal
2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
cb06526b10
[tests] Remove libuv dependency from the tests
2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
ff47838474
[tests] Add utests for Timer
2015-12-01 11:49:01 +02:00
Thiago Marcos P. Santos
6762cd0ca9
[tests] Add utests for AsyncTask
2015-12-01 00:00:09 +02:00
Bruno de Oliveira Abinader
d55aa7929c
[core] Source should receive a ref to MapData just once
2015-11-27 17:47:02 +02:00
John Firebaugh
1d33790dc0
[core] Fix image type of Map::renderStill
...
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
2015-11-25 15:57:37 -08:00
John Firebaugh
54eff4b4c1
[core] Add image tests
2015-11-25 15:57:36 -08:00
John Firebaugh
0c1e378bc9
[core] Rewrite image handling
...
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
2015-11-25 15:57:36 -08:00
John Firebaugh
36081f6486
[core] For binary image data use uint8_t, not char
2015-11-23 17:28:44 -08:00
Minh Nguyễn
dc5a55c670
Fixed Linux builds; code style
2015-11-19 12:35:28 -08:00
Minh Nguyễn
a983dc8259
Ported replaceTokens() tests from GL JS
2015-11-18 19:06:33 -08:00
Bruno de Oliveira Abinader
adfac6f061
[core] Added ConstrainMode::{HeightOnly,WidthAndHeight}
...
ConstrainMode gives flexibility to our engine to choose between
constraining both vertically and horizontally, or just vertically
(default behavior).
Constrain in both axis means we can no longer pan the map beyond the map
boundaries. This fixes an issue where e.g. annotations disappear upon
crossing the map boundaries.
2015-11-18 09:37:27 +02:00
John Firebaugh
1e350b7ea4
[core] Reorganize sprite related files
2015-11-12 13:03:14 -08:00
John Firebaugh
b81243daa9
[core] Merge PiecewiseConstantFunction into Function
2015-11-06 10:38:48 -08:00
John Firebaugh
7de4ce5bcb
[core] Simplify Function
2015-11-06 10:38:47 -08:00
Tom MacWright
c80c823da2
[core] Ensure URL normalization is safe. Fixes #2695
2015-10-28 10:44:33 -04:00
John Firebaugh
8d79c25765
[core] Remove MapData dependency from StyleParser
...
MapData was needed for two things: getting the default transition and
fade durations, and detecting still rendering vs. continuous.
The first is avoided by making transition durations optional, and
supplying the default fallback value at evaluation time. The second did
not fix the still rendering issue, and will be followed up with a
different approach in a later commit.
2015-10-23 13:56:55 -07:00
Bruno de Oliveira Abinader
5fa144647d
[core] Added GLContextMode to MapData
...
Adding new mbgl::GLContextMode enum to mbgl::Map ctor, which gets stored
in MapData. In shared GL context environments, we cannot assume that the
GL state that has been left since the last draw is the same, so we reset
the GL configurations to their default values.
2015-10-22 16:02:39 -07:00
John Firebaugh
8baa804a44
[core] Fix swapped lat/lon in geo.cpp
2015-10-20 13:54:19 -07:00
John Firebaugh
2066295e35
Install RapidJSON from mason
2015-10-01 11:40:47 -07:00
Konstantin Käfer
a84cf62424
[core] include api.mapbox.com in canonicalization
...
and move the canonicalization to mapbox.cpp since it's not specific to the SQLiteCache
2015-09-28 15:06:41 +02:00
John Firebaugh
15a66b8989
Consolidate test-suite rendering harnesses ( #2236 )
2015-09-04 10:52:14 -07:00
Ansis Brammanis
d703e58c79
add Point <--> LatLng conversion tests
2015-08-27 14:00:43 -04:00
Lucas Wojciechowski
648b587959
Fixed missing labels and icons
2015-08-24 14:22:02 -07:00
Lucas Wojciechowski
e97662972f
Support v8 sprite, glyph, and style mapbox:// urls
2015-08-21 14:39:26 -07:00
Lucas Wojciechowski
a85fd681fc
Support new glyph URL syntax
2015-08-20 11:59:07 -07:00
jakepruitt
14ba3cfd6a
Adding special case for non-fontstack "glyph" resource URLs
...
- does not prepend /v4/ to api endpoints like /fonts/v1/
- only prepends it to things starting with /fontstack
- solves the problem in #1918
- refs mapbox/mapbox-gl-style-spec#309
2015-07-27 10:16:14 -04:00
Thiago Marcos P. Santos
7d4349e308
Added unit tests for the WorkQueue
2015-07-16 19:38:38 +03:00
Bruno de Oliveira Abinader
0ea8a37cb0
Unify default transition values in MapData
...
Relevant changes:
- Added 'defaultFadeDuration' and 'defaultTransitionDelay' to MapData;
- Painter & StyleParser now receives a reference to MapData;
- As previously seen on the code: 300ms is the default fade duration
and 0ms is the default transition duration;
- We no longer pass the current time point to Style, since it now uses
MapData.animationTime, which gets updated in MapContext::update().
- Updated StyleParser check to use a mock MapData;
2015-07-14 16:58:32 +03: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
Thiago Marcos P. Santos
ec1b4c43fd
Do not force uv_loop_t as the first parameter for a threaded object ctor
2015-07-06 16:01:59 +03:00