Skip to content
This repository was 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
jschr wants to merge 2 commits into
googlearchive:gh-pagesfrom
jschr:gh-pages
Open

allow imagePath to be a function, useful for cache busting#82
jschr wants to merge 2 commits into
googlearchive:gh-pagesfrom
jschr:gh-pages

Conversation

@jschr
Copy link
Copy Markdown

@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
Copy Markdown
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