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

[Bug] missing center/zoom props don't produce an error or warning #283

Closed
usefulthink opened this issue Mar 27, 2024 · 5 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@usefulthink
Copy link
Collaborator

Description

When the center/zoom properties aren't set, the map can't render which can cause all sorts of problems. We should handle this somehow, for example by logging a warning to the console.

Steps to Reproduce

no

Environment

  • Library version: 0.8.x
  • Google maps version: any
  • Browser and Version: all
  • OS: all

Logs

No response

@usefulthink usefulthink added bug Something isn't working good first issue Good for newcomers labels Mar 27, 2024
@BParvatkar
Copy link

Can we have a logic where if both zoom and defaultZoom aren't defined then we have a default value of defaultZoom that gets applied to the map?

@maciej-ka
Copy link
Contributor

maciej-ka commented Apr 10, 2024

Perhaps Typescript Map props could better guite here ...

@usefulthink
Copy link
Collaborator Author

@BParvatkar I would like that as well, but it's difficult to pick a value not knowing what you're up to (world-map or city-map?).

Maybe issuing a warning and defaulting to rendering a world-map combine to be the best developer experience.

@maciej-ka
Copy link
Contributor

How about geolocation as a failback? (which can be denied, in which case we would need failback for failback, hmmm)

@usefulthink
Copy link
Collaborator Author

No, that'd be way too intrusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants