Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: if center changed before google map api was finished, map center will keep as the previous center#1205

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
sspku-yqLiu wants to merge1 commit intogoogle-map-react:master
base:master
Choose a base branch
Loading
fromsspku-yqLiu:master

Conversation

sspku-yqLiu
Copy link

hi Google map react team.

We faced an issue during use google map react. If api fromhttps://maps.googleapis.com is very slow, and we change map center before google map api return data. map may cannot detect the center change and will not move the center to the correct place.

Steps to reproduce:

  • use Default center, lets say center of singapore as the fallback location of my address
  • fetch data fromhttps://maps.googleapis.com andhttps://www.getMyHomeAddress.com
  • https://www.getMyHomeAddress.com return value first
  • change the pin and center value to the api data. and for now, we cannot findthis.map_, which mean we will skip the panTo function
  • https://www.getMyHomeAddress.com return value
  • since the prevProps center is already changed to my home, so it wont trigger panTo function also
  • google map will show the center as the fall back address

Plans for solve the problem:

  • add a stateinitializedCenter_ to force trigger panTo function when map is shown

@sspku-yqLiusspku-yqLiu changed the titleFix: map center wont change before map api is loadedFix: if center changed before google map api was finished, map center will keep as the previous centerDec 18, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@sspku-yqLiu

[8]ページ先頭

©2009-2025 Movatter.jp