simplemap icon indicating copy to clipboard operation
simplemap copied to clipboard

Multiple maps on same page

Open samuelbirch opened this issue 4 years ago • 3 comments

Multiple maps on the same page throws a js error and causes some of the maps not to load.

samuelbirch avatar Aug 09 '21 12:08 samuelbirch

@samuelbirch Is this in the control panel, or embeding?

Tam avatar Jul 11 '22 12:07 Tam

I just noticed the same. It's on embedding (on the front end rather than in the control panel). These are the errors: "You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors."

"Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'g') at js?key=XXX&callback=init_mapidXXX:187:153"

"Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'h') at Yi.data.Jf.map (js?key=XXX&callback=init_mapidXXX:189:178)"

Where you read XXX I have replaced the actual api key or map id value with junk!

Hope this helps.

tigerchick avatar Aug 04 '22 13:08 tigerchick

@Tam This issue also occurs in the control panel.

Craft 3.7.51 Maps 3.9.4 Screen Shot 2022-08-12 at 9 54 11 AM Screen Shot 2022-08-12 at 9 54 17 AM

br-designer avatar Aug 12 '22 14:08 br-designer