Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BQTileset metadata #1443

Merged
merged 30 commits into from
May 25, 2020

Conversation

Jesus89
Copy link
Member

@Jesus89 Jesus89 commented May 24, 2020

  • Fetch metadata
  • Update API
  • Refactor, performance improvements
  • Update with develop
const data = { project, dataset, tileset, token };
const metadata = { id_property: 'geoid', center: null }; // optional

const source = new carto.source.BigQueryTileset(data, metadata);
/**
 * BigQueryTileset source: PoC based on the MVT source to fetch tiles directly from a tileset in BigQuery.
 *
 * @param {object} data - BigQuery data to reference the tileset:
 * @param {string} data.project - The name of the BigQuery project.
 * @param {string} data.dataset - The name of the BigQuery dataset.
 * @param {string} data.tileset - The name of the BigQuery tileset table.
 * @param {string} data.token   - The token to authorize requests to the BigQuery project.
 *
 * @param {object} [metadata] - Optional attributes to overwrite tileset metadata:
 * @param {string} [metadata.id_property] - The name of the ID property ('cartodb_id', 'geoid').
 * @param {object} [metadata.properties]  - The information about available columns and types in the MVT ('{"geoid": {"type": "STRING"}, ...').
 * @param {string} [metadata.maxzoom]     - The maximum zoom with tiles data ('14').
 * @param {string} [metadata.minzoom]     - The minimum zoom with tiles data ('4').
 * @param {string} [metadata.center]      - The initial position and zoom of the map ('-76.124268,38.933775,14')
 * @param {string} [metadata.bounds]      - The global bounds with tiles data available ('78.178689,0.000000,0.000000,39.719731').
 * @param {string} [metadata.compression] - The type of tile compression ('gzip').
 * @param {string} [metadata.tile_extent] - The size and resolution of the tile ('4096').
 * @param {string} [metadata.carto_quadkey_zoom] - The zoom level for quadkey optimization ('8')
 */

elenatorro and others added 30 commits February 12, 2020 17:10
…nvert-default-legend-ordering

Feature: add option to sort legends in descending order [ch58612]
…ecion-in-category-widget

Make getAllCategories public [ch58614]
@Jesus89 Jesus89 merged commit 1c354c2 into bq-mvt May 25, 2020
@Jesus89 Jesus89 deleted the jarroyo/ch60920/bigquery-source-visualize-a-tileset branch May 25, 2020 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants