4 ms·
Tangram is currently exposed as a Leaflet plugin, but manages its own WebGL Canvas element (which is inserted into Leaflet's DOM hierarchy) and handles all rend
by bcamper 11y ago
Tangram is currently exposed as a Leaflet plugin, but manages its own WebGL Canvas element (which is inserted into Leaflet's DOM hierarchy) and handles all rendering on its own. Leaflet is essentially just serving as the UI/input layer here (map position and viewport info is forwarded to Tangram), and can also be a convenient way to add SVG paths or markers on top, or raster tile layers underneath. It hasn't shown any noticeable performance impact in benchmarks though (this is the same arrangement Mapbox GL uses for its own Leaflet plugin). In the future we'll also expose the Tangram API more directly for use outside of Leaflet though, this was just the quickest way to let people use it via a library they might already be familiar with.
- napsterbr 11y agoGot it, thanks for the explanation!