Google maps integration - crustering flickers when dragging

Open Beginner friendly
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Start with FlowmapSelectors._getClusterZoom() in packages/data/src/FlowmapSelectors.ts and reproduce the flicker using the linked StackBlitz with @deck.gl/google-maps while dragging. Check how mapZoom affects clusterZoom, then verify that clustering remains stable during Google Maps dragging without changing the existing MapLibre behavior.

Written by the indexing model from the issue text.

Description

Hi there,

I'm trying to integrate Flowmap with @deck.gl/google-maps Layer, it works well but with clustering auto the flows "flickers" when we drag the map.

I created a stackblitz to reproduce the issue.

I digged into the code and I found that in FlowmapSelectors._getClusterZoom() in MapLibre the mapZoom is always the same (3, 4, etc) but with Google Maps there is a rounding issue and the value can be 4, 4.000000000000003, 3.999999999999998, etc so the clusterZoom differs which causes this effect.

Rounding mapZoom to 5 decimals fixes this problem but I may not be aware of side effects which is why I don't send a PR, but it shouldn't be much more than this.

You could add this Google Maps feature as an example in your docs.

Dominant language
TypeScript
Stars
141
Forks
25
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from visgl/flowmap.gl

All issues in visgl/flowmap.gl

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.