Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

allow imagePath to be a function, useful for cache busting #82

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

jschr
Copy link

@jschr jschr commented Jun 14, 2016

Adds support for a function to be provided as the imagePath option. The current option doesn't easily allow for cache busting assets.

Usage:

var markerCluster = new MarkerClusterer(map, markers, {
    imagePath: function (i) {
      // would return something like m1-e359da86cb.png
      return imageCache['m' + (i + 1) + '.png']
    }
});

@PeterTheOne
Copy link
Contributor

Haven't tested it but it makes sense and looks good!

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

Successfully merging this pull request may close these issues.

2 participants