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

Add performance tips to CARTO.js docs #2172

Merged
merged 13 commits into from
Jul 13, 2018
Merged

Conversation

rubenmoya
Copy link
Contributor

Related to: #2168

Description

This PR adds a Performance Guide to the documentation to explain how source, style, layer and dataviews interact with each other and how to change their attributes correctly.

This PR also implements .setDataset in carto.source.Dataset with the same behavior as setQuery in carto.source.SQL

* @returns {Promise} - A promise that will be fulfilled when the reload cycle is completed
* @api
*/
Dataset.prototype.setDataset = function (tableName) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use setTableName for that function since dataset.setDataset(tableName) is a bit confusing

Copy link
Contributor

@inigomedina inigomedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice guide, man. Helpful, clear, and to the point. 💯


These style instances work the same way as sources do. It is pretty common to change styles in your map based on certain triggers, so that you can adequate your visualization to what you want to show.

When linked to a layer, the will automatically show the style change by invoking `.setContent` on the style object with a string containing the new style content.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When linked to a layer, the will automatically show...

I am not sure if you wanted to say here they will automatically show.

@jesusbotella
Copy link
Contributor

retest this please (not human retest 😂 )

@ivanmalagon ivanmalagon merged commit 569b6ad into master Jul 13, 2018
@ivanmalagon ivanmalagon deleted the 2168-performance-guide branch July 13, 2018 08:56
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.

5 participants