Skip to content

custom default image marker for csv item #6847

Answered by na9da
noobHappylife asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @noobHappylife

For using custom images as icons the marker property must be set to a data-uri like data:image/png... Here is a full working example which you can see in action here.

{
          "type": "csv",
          "name": "CSV Test",
          "url": "test/incidents_notime.csv",
          "defaultStyle": {
            "point": {
              "null": {
                "marker": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAZNJREFUWIXtlrFLQlEUxr/QPGYhTbYEhhgWErjU0twQ9AdEGNnU0CiBL60pMBqC2gSHhgoamhoFt8ZaIugtQhFFY1Hmp0EN+ehZDd3e84ngB493733vnPPjXj7OdaPFcncA2h3AIyLrJBMiskcy01QAEdkgmTavkTTeaQDpbyFdtgKQXFH5/y9SPQKPefII7…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@noobHappylife
Comment options

Answer selected by noobHappylife
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants