The Style object might have been created but the Source is not
yet available because the JSON file was not set. Can happen
specially when the style is loaded from the network.
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.
Added a filter to remove anchors with the same text that are too close to each other.
Updates to spacing and offset of anchor placement along lines:
Takes into account icon size for calculating label length.
Recalculates spacing for long labels.
Adjusts offsets to first anchors if line is continued from outside the tile boundary.
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
https://github.com/mapbox/mapbox-gl-js/pull/1359
Round line joins used to be drawn by adding a semicircle cap to the end
of each segment. This looked fine for opaque lines not for
semi-transparent lines.
This changes the triangulation so that round line joins don't overlap
with segments. The gap between segments is filled with small triangles
that look like pie slices. The edge of the round linejoin is made up of
many short straight lines that look round at the sizes we draw lines.
Since sharp angles are infrequent, this does not significantly affect
the total number of triangles created.
Joins for angles that are really sharp are still drawn with overlap.
Use the same API/pattern for parsing raster tiles as we use for vector
tiles. Forward the error as an exception that will ultimately reach the
StillImageCallback.
Also set the tile to State::obsolete on error like we do for vector
tiles.
fix#1816fix#1689
The missing label was the only one in it's bucket. Since the label was
outside the tile boundaries it wouldn't need to be drawn by the bucket.
Since the bucket had no features to draw, it was dropped completely.
Even if a bucket doesn't have any features that need to be rendered, it
may have features that need to impact the placement of features in other
layers.