How to use the viewport-mercator-project.worldToLngLat function in viewport-mercator-project

To help you get started, we’ve selected a few viewport-mercator-project 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 uber / streetscape.gl / examples / website-demo / src / layers / building-layer / utils / decode.js View on Github external
function project(x, y, scale, line, extent) {
  const sizeToPixel = extent / TILE_SIZE;

  for (let ii = 0; ii < line.length; ii++) {
    const p = line[ii];
    // LNGLAT
    line[ii] = worldToLngLat([x + p[0] / sizeToPixel, y + p[1] / sizeToPixel], scale);
  }
}
github keplergl / kepler.gl / src / deckgl-layers / 3d-building-layer / 3d-building-utils.js View on Github external
function project(x, y, scale, line, extent) {
  const sizeToPixel = extent / TILE_SIZE;

  for (let ii = 0; ii < line.length; ii++) {
    const p = line[ii];
    // LNGLAT
    line[ii] = worldToLngLat([x + p[0] / sizeToPixel, y + p[1] / sizeToPixel], scale);
  }
}
github uber / deck.gl / examples / website / tagmap / tagmap-layer / tagmap-wrapper.js View on Github external
tags.forEach(tag => {
      tag.position = worldToLngLat(tag.center, scale);
    });