mapbox / mapbox/mapbox-gl-js

"Highlight features containing similar data" example inconsistent across zoom levels

Open
#7,913 1 comment 0 reactions 1 assignee View on GitHub

@rreusser is already working on this.

Since Jul 9, 2021.

docs :scroll:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 0.53.0

**browser**: Chrome

### Steps to Trigger Behavior

1. Go to the example at [https://docs.mapbox.com/mapbox-gl-js/example/query-similar-features/](https://docs.mapbox.com/mapbox-gl-js/example/query-similar-features/)
2. At the default zoom level, hover over San Juan County in northwest New Mexico. The tooltip will say that 4 results were found with a total population of 158,802.
3. Zoom in until you can just see the San Juan county in New Mexico. The tooltip will now say that 5 results were found with a total population of 285,257.

### Expected Behavior

The issue is clearly documented in the API [documentation for the `querySourceFeatures` method](https://docs.mapbox.com/mapbox-gl-js/api/#map#querysourcefeatures), but it seems like this example should include a demonstration of how to remove duplicate features arising from features being included in multiple tiles.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.