Please make imagePath accept dataURL.
scarabdesign opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
I've been moving more and more of my map icons into code, making canvases and exporting to use as Google Map markers. I'd like to use a generated marker for a cluster as well.
Describe the solution you'd like
I'd like to be able to set the imagePath property to a dataURL, or provide an optional "icon" property that matches Google marker scheme.
Describe alternatives you've considered
Requesting a pull to do it myself ;)
Additional context
It just looks like you are using the imagePath to pack a style object, so I'm not sure how accessible dataURLs are to CSS, if that's what's going on. However, I would love this feature, as I'm sure would others!
Does something like #617 (comment) match your needs?
Perhaps! However, I've just discovered that it works fine simply adding a hash to the end of the URL, which ignores the iteration and additional file extension. In my case (for now) they are all the same image so it seems to work fine fine.
new MarkerClusterer(map, markers, { imagePath: icon + "#" });
I think this is a case where we have too many ways to do things and the interface becomes confusing. Glad you found a solution!