1

I am wanting to use a different marker-file based on a value returned via SQL in cartodb. I am wanting todo something like

marker-file: url('[icon]');

Where the value in [icon] is a full URL to a PNG image. When I do the above there is no error displayed, but there is no marker displayed on the map. If I use the below then the marker is displayed.

marker-file: url('http://test.wildwalks.com/wildwalks_custom/icons/map/access/marker-green-seat-136.png');

The value returned by [icon] is identical to this full URL. Any suggustions on how to use SQL values to define marker-file urls?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Mar 3, 2016 at 4:14

1 Answer 1

1

According to the documentation here and here the marker-file parameter is expecting an URI, not an expression, so you would need to use the URL directly.

If you have several categories and you want to use different markers for them, you would need to filter the data in CartoCSS for the values of any of your columns (it could even be the column for the URLs themselves or any other column in which you store the categories) and then, inside the filter, apply the marker-file with the URL corresponding to each case.

answered Mar 3, 2016 at 9:19
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.