Skip to content

Conversation

@Doubi88
Copy link

@Doubi88 Doubi88 commented Oct 4, 2022

Hey, thanks for your work, this was really helpful.

I use leaflet with TypeScript and in @types/leaflet, "fill" is declared as boolean, which is completely correct and should stay so, but that means that I cannot write the String "url(...)" to it. I solved that for my case by changing your code to use "fillImage" and adding this field to the PolylineOptions in a new .d.ts file in my project.
I'd like to contribute this to your code, but I don't know, if the way I did this is helpful or it should be done differently.
Another approach I'd like to suggest is putting this project on npm and adding an @types entry for it. But I'm not sure if that would work either, because leaflet plugins are a bit difficult to get them to work with typescript.

Needed for TypeScript support. See pull request for details.
@Doubi88 Doubi88 changed the title Changed "fill" to "fillImage" Fix for TypeScript-Support with @types/leaflet Oct 5, 2022
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

Successfully merging this pull request may close these issues.

1 participant