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

add capability to inspect a cluster on click to cluster example #6999

Merged
merged 2 commits into from
Jul 21, 2018

Conversation

andrewharvey
Copy link
Collaborator

@andrewharvey andrewharvey commented Jul 21, 2018

Launch Checklist

  • briefly describe the changes in this PR

Methods for inspecting GeoJSON clusters were introduced in #6829, and now in 0.47.0. This PR adds to the cluster example the getClusterExpansionZoom method so when you click on a cluster the map zooms in to expand it.

  • n/a write tests for all new functionality
  • n/a document any changes to public APIs
  • n/a post benchmark scores
  • manually test the debug page
  • n/a tagged @mapbox/studio and/or @mapbox/maps-design if this PR includes style spec changes

I wasn't able to get the shorthand click features to work, not sure why. 🤔

 map.on('click', 'clusters', function (e) {
    console.log(e.features)
}

@mourner mourner merged commit 4fbcdc4 into mb-pages Jul 21, 2018
@mourner mourner deleted the cluster-expansion-example branch July 21, 2018 06:51
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.

2 participants