- 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
This will make the code a lot more clear and it will
also move how parsing is initiated to the GlyphPBF
class, to be initiated after the request, like we do
for other resources.
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;
Parsing errors will be reported to Observers. In practice this will
bubble all the way to the Map object.
This will make possible to identify possible corrupted data instead
of rendering without sprites like we do in case of semantic errors.
We can log for different threads (main, map, workers, etc) so
we need to lock before adding the messages on the list.
This was causing few tests to randomly crash.
this makes sure that adding custom sprite imagery will add them to the new Style object rather than
the old one in case a user adds new custom sprites immediately after changing a stylesheet
when passing a std::string instead of an Image, the parameter gets implicitly and automatically converted (== parsed) to a temporary Image object. Since parsing an Image shouldn't be a frequent operation
this is required so that devices that aren't using 1x or 2x (like the iPhone 6 Plus with a pixelRatio of 3x) still show icons, albeit bilinearly scaled to the correct size in the SpriteAtlas
Instead of transforming between return value and callback, pass
the wrapped callback on to the invoked function as the last argument.
This eliminates the need for multiple invokeWithArgument overloads
and permits invoked functions to be asynchronous.