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

648 default style #675

Merged
merged 10 commits into from
May 17, 2019
Merged

648 default style #675

merged 10 commits into from
May 17, 2019

Conversation

Jesus89
Copy link
Member

@Jesus89 Jesus89 commented May 17, 2019

Closes #648

  • Add default basemap
  • Add default styles(geom_type)
  • Add geom type detection
    • Remote
    • Local
  • Update examples
  • Update tests

return defaults._CREDENTIALS
return defaults.CREDENTIALS

def _get_geom_type(dataset):

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1

Copy link
Contributor

Choose a reason for hiding this comment

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

Make hound happy again

Copy link
Member Author

Choose a reason for hiding this comment

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

This commit should fix the linter: 862dd2a


def _map_geom_type(self, geom_type):
return {
'Point': Dataset.GEOM_TYPE_POINT,
Copy link
Contributor

Choose a reason for hiding this comment

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

Only a question: why don't we use the usual ones (without the _map_geom_type method)

  • Point
  • MultiPoint
  • LineString
  • MultiLineString
  • Polygon
  • MultiPolygon

Copy link
Member Author

Choose a reason for hiding this comment

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

Because we need to group to point, line and polygon. Point and MultiPoint have the same style, LineString and MultiLineString have the same style, etc.

You can take a look at how default styles are defined: https://github.com/CartoDB/cartoframes/pull/675/files#diff-3233096e59fdf4159c753178da9e9c37R31.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can move this function to the Source class.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should use this dict closer to the visualization part, but I think is good enough right now.

@Jesus89 Jesus89 merged commit 448bdf5 into develop May 17, 2019
@Jesus89 Jesus89 deleted the 648-default-style branch May 17, 2019 15:02
@@ -1,30 +1,21 @@
_HTML_TEMPLATE = '<iframe srcdoc="{srcdoc}" width="{width}" height="{height}"></iframe>'
CARTO_VL_PATH = 'https://libs.cartocdn.com/carto-vl/v1.2.5/carto-vl.min.js'
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO we should turn to just v1.2 for free updates from our cdn

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Added here: 78598d1

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.

4 participants