Skip to content

v0.4.1

Compare
Choose a tag to compare
@bcamper bcamper released this 13 Nov 21:40
· 2281 commits to master since this release

New Features + Style Syntax/API Changes

  • Zoom-based interpolation ("stops") for the following font properties:
    • Font size (specified in px, pt, or em)
    • fill color (partially worked previously, fixes bugs with using string colors)
    • Stroke width (specified in px)
    • Stroke color
    • Example (see #214 for more info):
draw:
  text:
    font:
      family: Helvetica
      fill: [[14, white], [18, gray]]
      size: [[14, 12px], [16, 16px], [20, 24px]]
      stroke:
        color: [[16, white], [18, red], [20, blue]] 
        width: [[14, 3px], [20, 8px]]
  • Add anchor positioning to points/sprites.
    • Uses the same anchor syntax as for point labels (left, bottom-right, etc.).
    • Unlike with labels, the align keyword is not needed.
    • See #213 for more info.
  • Add vec3 worldNormal() accessor in shaders, to complement modelPosition() and worldPosition() functions. Provides compatibility with Tangram ES. See #209.
  • Transparency (alpha) values are now supported in text rendering (e.g. font fill and stroke color will now parse alpha values).
  • If an explicit size is not specified for a sprite, it defaults to the sprite's pixel size.
  • Draw lines that have zero width at the current zoom but will scale up to have a positive width at the next zoom; causes lines to ease/scale in rather than popping in when the tile zoom changes.
  • When device pixel ratio changes, for example when switching from an external to built-in display, the map resolution is updated to match. See #211.

Bug Fixes

  • When an array is used as a layer filter, it is implicitly treated as an any filter.
    • To illustrate, the following are equivalent:
      • filter: [ kind: minor_road, railway: true ]
      • filter: { any: [ kind: minor_road, railway: true ] }
    • Fixes discrepancy with docs and Tangram ES.
  • Fix comparison of data sources updated at run-time. See #215.
  • GLSL global initializers must be constant. Not enforced on most devices, but fixes shader compilation errors on some (observed on Samsung Galaxy Note Edge). See #212.
  • Support multipolygon decoding for MTV tiles. See #217.
  • Don't render lines with negative or NaN width.
  • Don't load tiles outside expected coordinates for current zoom (e.g. negative tile coords).

Internal

  • Convert all JS properties/filters NaN return values to null (NaN is unpredictable when used as a binary value for typed arrays / GL VBOs).