Closed IagoLast closed 7 years ago
The use case would be:
- Load a map with markers
I guess the layer needs to have a marker-file
in the CartoCSS, right?
Nope, In cartocss is calledurl(..)
It should have something like:
marker-file: url('https://s3.amazonaws.com/com.cartodb.users-assets.production/maki-icons/cafe-18.svg');
Right something like this:
#layer {
marker-width: 20;
marker-fill: #FFB927;
marker-fill-opacity: 0.9;
marker-file: url('https://s3.amazonaws.com/com.cartodb.users-assets.production/maki-icons/marker-18.svg');
marker-allow-overlap: true;
marker-line-width: 1;
marker-line-color: #FFF;
marker-line-opacity: 1;
}
- With this branch the error disappears.
I still see the following error in this branch:
renderer_js.js?5c39:245 Uncaught (in promise) Error: :5:2 Unrecognized rule: marker-file. Did you mean marker-fill?
at CartoCSS.parse (renderer_js.js?5c39:245)
at CartoCSS.setStyle (renderer_js.js?5c39:120)
at CartoCSS (renderer_js.js?5c39:10)
at carto.RendererJS.render (renderer_js.js?5c39:292)
at Object.extractFeatures [as carto2Draw] (carto.js?81a1:16)
at Object.TH.setLayerDraw (tangram-helper.js?a135:23)
at eval (main.js?a292:52)
at Array.forEach (<anonymous>)
at _callee$ (main.js?a292:41)
at tryCatch (runtime.js?1aab:65)
I guess that's the error that will be captured here, right? I guess it's a legit error since this library doesn't support marker-file
...
Since the new version of the carto compiler detects the error before reaching the tangram-carto code this I think PR is outdated
Closing this PR then.
Since textured markers are buggy in tangram, it makes no sense to have code for that in our library.
Note: This PR needs to be used with a new version of the tangram-reference where marker-files are not allowed.