How to use the tangram.cartodb function in tangram

To help you get started, we’ve selected a few tangram examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CartoDB / carto.js / src / geo / leaflet / leaflet-cartodb-webgl-layer-group-view.js View on Github external
var LeafletCartoDBWebglLayerGroupView = function (layerGroupModel, opts) {
  opts = opts || {};
  LeafletLayerView.apply(this, arguments);
  var metric = Profiler.metric('tangram.rendering');

  metric.start();

  this.trigger('loading');

  this.tangram = new TC(opts.nativeMap, this.initConfig.bind(this, layerGroupModel), opts.showLimitErrors);

  this.tangram.onLoaded(function () {
    if (metric) {
      this.trigger('load');
      metric.end();
      metric = void 0;

      log.info('Rendered Geometries Count: ', this.tangram.getTotalGeometries());
    }
  }.bind(this));

  this.layerGroupModel = layerGroupModel;
};