Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Image Markers Causing Error: t.error is not a function #79

Open
JeanHules opened this issue Nov 10, 2020 · 2 comments
Open

Custom Image Markers Causing Error: t.error is not a function #79

JeanHules opened this issue Nov 10, 2020 · 2 comments

Comments

@JeanHules
Copy link

JeanHules commented Nov 10, 2020

index.js?8a37:1 Uncaught (in promise) TypeError: t.error is not a function

series={{
markers: [
{
attribute: 'image',
scale: {
closed: '/public/img/icon-np-1.png',
activeUntil2018: '/public/img/icon-np-1.png'
},
values: this.state.markers.reduce((p, c, i) => {
const pp = p;
console.log(pp);
pp[i] = c.status;
return pp;
}, {}),
legend: {
horizontal: true,
title: 'Nuclear power station status',
labelRender: (v) => {
if (false) {
console.log('dd');
}
return {
closed: 'Closed',
activeUntil2018: 'Scheduled for shut down
before 2018',
activeUntil2022: 'Scheduled for shut down
before 2022'
}[v];
}
}
}
]
}}

I can't figure out why.

@fed135
Copy link

fed135 commented Apr 22, 2021

Found this on SO: https://stackoverflow.com/a/40303232

kadoshms pushed a commit that referenced this issue Oct 2, 2021
@AstaDK
Copy link

AstaDK commented Dec 27, 2021

Facing the same issue. Any update on this problem?
I faced it while I try use marker icon with react

series={{
          markers: [
            {
              attribute: "image",
              legend: {
                horizontal: true,
                labelRender: function noRefCheck() {},
                title: "Nuclear power station status",
              },
              scale: {
                _iconMarker: icons.marker,
              },
              values: {
                0: icons.marker,
                // ...handleRenderMarker(),
              },
            },
          ],
        }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants