Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Map] Google Maps rendering fails when rendering more than 1 map #2846

@SVillette

Description

@SVillette

Hi,

Thanks for the map package, it's awesome to have it directly in the Symfony ecosystem.

However, I encountered an issue when rendering more than one map. The rendering of the second map (and the following ones) fails with the following JavaScript error:

Uncaught (in promise) TypeError: _google.maps.Map is not a constructor
    at extended.doCreateMap (map_controller.js:161:1)
    at extended.connect (map_controller.js:24:1)
    at extended.connect (map_controller.js:134:1)
    at Context.connect (stimulus.js:1498:1)
    at Module.connectContextForScope (stimulus.js:1668:1)
    at Router.scopeConnected (stimulus.js:2054:1)
    at ScopeObserver.elementMatchedValue (stimulus.js:1961:1)
    at ValueListObserver.tokenMatched (stimulus.js:999:1)
    at TokenListObserver.tokenMatched (stimulus.js:930:1)
    at stimulus.js:924:1

I have no idea how to fix this issue. I have set a different mapId for each map.

Thanks in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions