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] renderingType is incompatible with reuseMaps #471

Closed
anliting opened this issue Aug 6, 2024 · 1 comment · Fixed by #501
Closed

[Bug] renderingType is incompatible with reuseMaps #471

anliting opened this issue Aug 6, 2024 · 1 comment · Fixed by #501
Labels
bug Something isn't working

Comments

@anliting
Copy link

anliting commented Aug 6, 2024

Description

I get an error like this:

Uncaught Error: Setting map 'renderingType' after instantiation is not supported.

It does not throw if only one of renderingType and reuseMaps is supplied.

Steps to Reproduce

  1. Create a Map like this:
<Map
    renderingType={google.maps.RenderingType.VECTOR}
    reuseMaps
/>
  1. Mount it.
  2. Unmount it.
  3. Mount it.

Environment

  • Library version: 1.1.0
  • Google maps version: weekly
  • Browser and Version: Google Chrome 127.0.6533.72
  • OS: Arch Linux

Logs

main.js:6937 Uncaught Error: Setting map 'renderingType' after instantiation is not supported.
    at lca.renderingType_changed (main.js:367:1635)
    at Xk (main.js:140:251)
    at Xk (main.js:140:311)
    at _.Vk.set (main.js:260:719)
    at jo.setRenderingType (main.js:148:354)
    at _.Vk.setValues (main.js:261:242)
    at main.js:23769:12
    at commitHookEffectListMount (main.js:6949:114)
    at commitPassiveMountOnFiber (main.js:7162:1577)
    at commitPassiveMountEffects_complete (main.js:7162:872)
@anliting anliting added the bug Something isn't working label Aug 6, 2024
@usefulthink
Copy link
Collaborator

I wasn't aware that the renderingType can't be changed after the map is created, we'll have to adjust our implementation so renderingType is treated like the mapId, creating a new map instance when changed this should then also make it work with reuseMaps.

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

Successfully merging a pull request may close this issue.

2 participants