Releases: tangrams/tangram
Releases · tangrams/tangram
v0.11.7
Improvements
- Use Leaflet events to track pan/zoom (avoid jitter from rapid re-snapping during slow pan or zoom)
interactive
flag onpoints
-nestedtext
inherits from parent point (N.B.: matches Tangram ES behavior)- Scene
load
event now fires afterglobal
property substitution - Scene adds a new
update
event that is called (with same data asload
) when scene is updated (scene.updateConfig()
is called) - Optimize redraw based on presence of other Leaflet map pane layers
- Avoid unnecessary re-render passes when feature selection requested #482
- Use hash function for key on GL shader and program caches
- General memory usage reductions
- Only reload fonts if any definitions have changed
- Perform bounds checking on requested point for feature selection
- Upgrade PBF, MVT parsing, and fontfaceobserver libraries
Bug Fixes
v0.11.6
v0.11.5
Enhancements
- Reduce scroll-wheel zoom jank in Firefox and Edge/IE
- Apply different throttling behavior to Chrome/Safari vs. FF/Edge/IE f211518
- Add a limit on ancestor proxy tile depth (currently 5 zoom levels) to prevent excessively scaled geometry da4dc32
- Optimize handling of
0px
-size points/labels (assists in showing only the text portion when using apoints
-based style) 825c6d9 300d4cc - Reduce selection buffer read delay to prevent resource contention in IE11 04c6666
Bug Fixes
- Prevent event subscribers from bubbling exceptions up to Tangram by wrapping in
try/catch
blocks c0daa42- Addresses Tangram Play issue where mis-handled shader error was breaking map updates.
- Prevent out-of-date GL objects from being used with new context #470
- Namespace GL shader and program objects by GL context id 00d0f15
- Prevent extraneous / visually distracting snap-to-pixel-grid animations when calling
scene.updateConfig()
- When responding to Tangram view changes, only update the Leaflet view if it differs 9165261
- Prevent redundant material shader injection 43e542c
- Was reducing effectiveness of GL program/shader object caching
- When
scene.rebuild()
request is queued (due to throttling), save options and passthrough to queue (previously these options were being ignored) 2f68fbf - Handle missing
Math.log2
support in IE11 #473 #474
v0.11.4
Enhancements
- Improved text clarity for diagonal labels
- Achieved by rendering these labels at 150% size for higher quality sampling on rotation #467
- Improved performance on Edge/IE11 by enabling cancellation of pending tile network requests
- These requests are proxied from worker to main thread, so the cancellation request must be proxied as well
Bug Fixes
- Support MVT data source tile extents of arbitrary scale (was previously hardcoded to assume 4096 extent)
v0.11.3
Bug Fixes
- Fix handling of layer filter properties for the full range of valid characters #466
- Previously only worked for properties compatible with JS dot notation access, e.g. excluding characters such as colons or other special characters
- Fix initialization of data sources added at run-time (with
scene.setDataSource()
) #452 - Fix cancellation of tile requests
- Works in Chrome & Safari, does not work in FF due to issue w/XHRs made from worker threads; will address in future release
Internal
- Moves the filter matching module from an external module (was
match-feature
) into the main repository
v0.11.2
v0.11.1
Enhancements
- Improve text clarity by aligning sprites to pixel grid #458
- Results in significantly better text clarity, especially for non-retina displays, small font sizes, and non-Latin scripts #453
- Improve shader initialization performance:
- Prevent non-tiled data sources from being loaded more than once (by pinning all tiles from each to a single worker - previously was loaded one per worker) 7a4c479
- Allow global properties to be used for texture values #449
Bug Fixes
- Fix intermittent Edge/IE11 initialization failures (worker threads hang) #448
- Fix alpha compositing for
blend: overlay
#455 - Fix wayward points placed off of lines when using
placement: spaced
6cf42c2 - Detect duplicate line vertices in more cases #459
- Resize map on first page visibility event, fixes intermittent cases where map would not draw when spawned in new tab a797d03 c08e191
- Fix occasional missing style errors, such as while loading a new scene 9d58680
- Remove warning in tile build on missing data source 1e59bdc
- Make application of feature selection to styles consistent with Tangram ES c604fc8
- Fix Chrome GL attribute warning when rendering feature selection pass 0eb31cb
v0.11.0
Enhancements
- 10% reduction in minified + gzipped bundle size
- 25% faster label collision, as measured on a complex label scene (Bubble Wrap central London at z17) #440
- New placement strategies for improved cartographic symbols including road shields and one-way street arrows #409 #441
placement
parameter to specify howpoints
-based styles should be applied to line or polygon features:placement: vertex
: place points at line/polygon ring vertices (default and previous library behavior)placement: midpoint
: places points at line/polygon ring segment midpoints (better for road shields, to avoid ambiguous intersections such as highway interchanges)placement: spaced
: places points along a line/polygon ring at fixed intervals, useful for symbols like one-way street arrows where consistent spacing is desirable- Spacing defined in pixels with
placement_spacing
parameter; defaults to80px
, also accepts zoom stops or JS functions
- Spacing defined in pixels with
placement: centroid
: places points at polygon outer ring centroid- Only applicable for polygons (supersedes previous
centroid: true
parameter)
- Only applicable for polygons (supersedes previous
- Additional parameters for
placement
values ofmidpoint
andspaced
:placement_min_length_ratio
parameter specifies the minimum line segment length as a ratio to the point being placed- Can be used to tune the number of symbols such as road shields up (with lower values) or down (with higher values), and avoid undesirable cases where a point obscures the underlying line segment
placement_min_length_ratio
defaults to1
, requiring line segment to be at least as long as the point itself- See #441 for more examples
tile_edges
parameter indicates whether points should be placed along tile boundaries (usually undesirable)- Applies same logic as
lines
styles. tile_edges
defaults tofalse
.
- Applies same logic as
- Enable repeat behavior (
repeat_distance
andrepeat_group
parameters) forpoints
-based styles- Separate
repeat_distance
values can apply to apoints
-based draw group with an attachedtext
. The former, on the "parent" point, determines how often any object of that type may repeat, while the latter, on the "child"text
, determines how often an object with that specific text may repeat.- Example: one may wish for road shields generally to appear within
80px
of one another, while requiring that a specific shield for the same highway only repeat every200px
- Example: one may wish for road shields generally to appear within
- Separate
shields:
repeat_distance: 80px # any given shield can appear within 80px of any other shield
...
text:
repeat_distance: 200px # shields with the same text must appear at least 200px apart
- Allow scene
import
values to be JS objects 654b29a- Allows for scene properties to be overridden at initial load time, without need to hook into Tangram events or update scene after load
- Example of this pattern, setting English language preference and enabling transit overlay on Mapzen's Bubble Wrap style at load time:
scene.load({
import: [
'https://mapzen.com/carto/bubble-wrap-style/5/bubble-wrap.yaml',
{ global: { ux_language: 'en', sdk_transit_overlay: true } }
]
});
- Adds smoothly animated double-click zoom via Leaflet plugin 655ad75
- Similar to default behavior of other popular vector map products
- Can be disabled with
modifyDoubleClickZoom: false
on initialization ofTangram.leafletLayer
- Data source
transform
functions will now be invoked for non-tiled and MVT data sources #434- Previously, these functions were only applicable to tiled
GeoJSON
orTopoJSON
sources
- Previously, these functions were only applicable to tiled
- Second argument of
Scene.load()
has been transitioned to a fulloptions
object (with backwards compatible support for specifyingconfig_path
string as the argument value) d392bb1
Bug Fixes
- On initial map load, do not block map rendering on loading/building of all tiles, e.g. tiles should "pop in" incrementally as they are finished building 92e4455
- Fix bounding boxes for labels with Italic fonts #431
Internal
- Remove use of ES6 features that
- Are not transpiled efficiently (including
for..of
loops, generators) - Can reduce bundle size by avoiding polyfills (
Set
,Map
)
- Are not transpiled efficiently (including
- Upgrade to TopoJSON 2.x, and use slimmed down fork to only include methods used by Tangram.
v0.10.6
v0.10.5
Enhancements
-
Upgrade demo to Leaflet 1.0.1
-
Improved Leaflet/Tangram scrollwheel zoom interaction (see #423)
- Tangram makes adjustments to Leaflet's default scrollwheel handling, for better animation synchronization with its own rendering. These modifications can be disabled with the
modifyScrollWheel
option:
var layer = Tangram.leafletLayer({ scene: ..., modifyScrollWheel: false });
- Tangram makes adjustments to Leaflet's default scrollwheel handling, for better animation synchronization with its own rendering. These modifications can be disabled with the
-
Allow the scene's base path to be set when the Leaflet layer is created, with the
sceneBasePath
option.- This is useful for developing or testing a local scene file referencing remote resources, such as in the case of Tangram Play.
- Example, a local image
image.png
referenced inlocal.yaml
will resolve tohttps://example.com/scene/image.png
:
var layer = Tangram.leafletLayer({ scene: 'local.yaml', sceneBasePath: 'https://example.com/scene/' });
Internal
- Fix base style counts in
scene.debug.geometryCountByBaseStyle()
debug stats.