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

Placing multiple maps on a single page results in only the latter not to be rendered #281

Open
Defcon0 opened this issue May 15, 2018 · 1 comment

Comments

@Defcon0
Copy link

Defcon0 commented May 15, 2018

Hello,

I have issues placing multiple maps on a single page. The problem is that there's only one single callback function:

https://www.google.com/jsapi?callback=ivory_google_map_load

In this function the one map is rendered that the code resulted from. But since this function has no hash in its name like ivory_google_map_load_e489f39a9a48the two functions override themselves. And each of the function only initiates the one of the 2 maps.

How can I fix this? Is it a bug?

Bye

@Defcon0
Copy link
Author

Defcon0 commented May 15, 2018

Update on this: Seems that this can be fixed very easily:

I added some random id in Ivory\GoogleMap\Helper\Renderer\ApiRenderer->getCallbackName():

return 'ivory_google_map_'.$callback.'_'.uniqid();

@egeloen Would that be an option to include in the core?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant