Skip to content

Missing style properties #240

Closed
Closed

Description

@edenh

To help close the gap between tm and gl and bring us closer to a public alpha, here is the status of what's currently possible with styles including some I wish we could do in gl. Some of these may be possible already, I just don't know how to accomplish them.

Fills

  • antialiasing
  • fill and stroke color including alpha channels
  • opacity
  • pattern image
  • pattern opacity (can be achieved currently with alpha in image, but it would be nice if we could control opacity and transition patterns)
  • stroke width
  • stroke placement (inside, outside, middle)
  • offset with separate styling (or duplicated layers)

22785058-82be-11e3-83ba-b7071dba41f8

Lines

  • antialiasing
  • fill color
  • width
  • opacity
  • offset
  • line join
  • line cap

Points

  • antialiasing
  • opacity
  • fill and stroke color
  • image
  • image size
  • placement
  • stroke-width (for text)

Nice to have (gl-specific)

  • automatic opacity transitions, as an option

transition

  • polygon/line smoothing

@ajashton are you seeing anything else?

cc @ansis @kkaefer

Activity

  1. kkaefer commented on Jan 24, 2014

    @kkaefer
    Member

    Technically, we can do text outlines and do fake bold/thin text; just a matter of exposing this to the stylesheet.

  2. kkaefer commented on Jan 24, 2014

    @kkaefer
    Member

    What are you referring to with "polygon/line smoothing"?

  3. edenh commented on Jan 24, 2014

    @edenh
    ContributorAuthor

    Ideally, would should avoid faux text weights. I was referring to the width and possibly halo-effect of a text stroke/outline.
    text outline

    re: smoothing
    Trying to mimic this carto style for polygons and lines. It could also be interesting to have this apply to drawing or other data vis tools down the road. With more precise control, we may allow for abstract work such as seen here: http://www.projectlinework.org/.

  4. ansis commented on Jan 26, 2014

    @ansis
    Contributor

    translations implemented in 1435e18

    "translate": [4, 4]

    The translation values can also be functions, just like line widths.

    translate

  5. kkaefer commented on Jan 27, 2014

    @kkaefer
    Member

    \o/

  6. ansis commented on Jan 27, 2014

    @ansis
    Contributor

    At what level do we want to handle some of these things?

    Strokes are just lines drawn on top of fills.
    Text halos are just glyphs drawn twice with different fake weights.
    Shadows are just lines with soft edges under fills.

    We can add properties for each of these directly into llmr, or we can let the abstraction be handled elsewhere.

  7. edenh commented on Jan 27, 2014

    @edenh
    ContributorAuthor

    Strokes are just lines drawn on top of fills.

    How would this look in the stylesheet? For example in the debug stylesheet, the buildings class is a fill with a stroke property (color). How would you control the stroke width in this situation?

    Seems like you cannot simply create a duplicate class for 'casing' to treat the fill bucket as a line, but maybe I'm missing something.

  8. ansis commented on Jan 28, 2014

    @ansis
    Contributor

    Talked about this on chat, but I'll add here as well:

    For complex strokes (something other than 1 pixel solid color), you need to add a new line bucket for those features, and then style that bucket as a regular line.

    The feature_type property can be used in buckets to choose which feature types to match. If you want to generate a line bucket for polygons:

    {
        "feature_type": "fill",
        "type": "line"
    }

    That should cover stroke width, stroke placement, and stroke patterns.

  9. ansis commented on Feb 2, 2014

    @ansis
    Contributor

    Fading for labels implemented in 83a39ec - when we add placement/collision prevention for points we'll be able to fade those too.

  10. mourner commented on Feb 4, 2014

    @mourner
    Member

    @ansis label fades are working weirdly for me on a Macbook with a trackpad... Most of the time they don't fade. E.g. they don't fade when tile zoom changes, and they also don't fade when you scroll continuously vs just dbl-clicking or zoom inertia after quick scroll.

  11. edenh commented on Feb 5, 2014

    @edenh
    ContributorAuthor

    👍 so awesome, as usual.

  12. mourner commented on Feb 17, 2014

    @mourner
    Member

    Anything else to cover here?

  13. edenh commented on Feb 17, 2014

    @edenh
    ContributorAuthor

    Just this, if feasible

    polygon/line smoothing

  14. kkaefer commented on Feb 17, 2014

    @kkaefer
    Member

    @edenh It's pretty unlikely that we're going to implement this anytime because OpenGL ES/WebGL don't have built-in NURBS support.

  15. edenh commented on Feb 17, 2014

    @edenh
    ContributorAuthor

    Bummer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions