CartoDB / cartodb

Location Intelligence & Data Visualization tool
http://carto.com
BSD 3-Clause "New" or "Revised" License
2.76k stars 650 forks source link

embed: filter layersdata to only provide layerstyle #11160

Closed matallo closed 7 years ago

matallo commented 7 years ago

we're exposing way too much info in the layersdata var of the embed view, thus we should filter that in order to provide only what we need, in our case https://github.com/CartoDB/cartodb/pull/11121/files#diff-5b973e80628d9f6ee2347253d83d3e2a

      attrs.cartocss = d.options.tile_style;
    }
    if (d.options.style_properties) {
      attrs.style = d.options.style_properties;
    }

ideally, we'd have a layerstyle with cartocss, style, and id

@juanignaciosl how feasible would it be to have this for https://github.com/CartoDB/cartodb/pull/11121 ?

thanks!

juanignaciosl commented 7 years ago

This shouldn't be a problem. Assigning @xavijam for prioritization. cc @CartoDB/builder-backend

matallo commented 7 years ago

after https://github.com/CartoDB/cartodb/pull/11121/commits/f13e2749eb9d4fd11acbc5a9aadf61110cae09d8 this doesn't seem to be needed anymore, closing then!

javitonino commented 7 years ago

As this has been reopened, does it need further work?

matallo commented 7 years ago

yeah, if I'm not wrong we'd only need the cartocss and id in the layerStyle https://github.com/CartoDB/cartodb/pull/11121/files#diff-5b973e80628d9f6ee2347253d83d3e2a so the rest of attributes can be discarded

matallo commented 7 years ago

like a charm!

xavijam commented 7 years ago

Closing since it is has been done and merged in the proper branch.