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

Multiple Maps on same page not working #17

Open
Shesharaopuli opened this issue Dec 7, 2017 · 1 comment
Open

Multiple Maps on same page not working #17

Shesharaopuli opened this issue Dec 7, 2017 · 1 comment

Comments

@Shesharaopuli
Copy link

I tried multiple maps on same page under tabs design.
One is working fine but not the other.


<?=
                GoogleMaps::widget([
                    'containerId' => 'provider_top10_map_container',
                    'id' => 'provider_top10_map',
                    'userLocations' => [
                        [
                            'location' => [
                                'address' => 'Kharkiv',
                                'country' => 'Ukraine',
                            ],
                            'htmlContent' => '<h1>Kharkiv</h1>',
                        ],
                        [
                            'location' => [
                                'city' => 'New York',
                                'country' => 'United States',
                            ],
                            'htmlContent' => '<h1>New York</h1>',
                        ],
                    ],
                    'googleMapsUrlOptions' => [
                        'key' => 'AIzaSyAaUANIimzoTReBvZxpkvToN3o7grnxNWg',
                        'language' => 'en',
                        'version' => '3.1.18',
                    ],
                    'googleMapsOptions' => [
                        'mapTypeId' => 'hybrid',
                    //'tilt' => 45,
                    //'zoom' => '2',
                    ],
                    'wrapperHeight' => '350px'
                ]);
                ?>

<?=
                GoogleMaps::widget([
                    'containerId'=>'provider_all_map_container',
                    'id'=>'provider_all_map',
                    'userLocations' => [
                        [
                            'location' => [
                                'address' => 'Kharkiv',
                                'country' => 'Ukraine',
                            ],
                            'htmlContent' => '<h1>Kharkiv</h1>',
                        ],
                        [
                            'location' => [
                                'city' => 'New York',
                                'country' => 'United States',
                            ],
                            'htmlContent' => '<h1>New York</h1>',
                        ],
                    ],
                    'googleMapsUrlOptions' => [
                        'key' => 'AIzaSyAaUANIimzoTReBvZxpkvToN3o7grnxNWg',
                        'language' => 'en',
                        'version' => '3.1.18',
                    ],
                    'googleMapsOptions' => [
                        'mapTypeId' => 'hybrid',
                    //'tilt' => 45,
                    //'zoom' => '2',
                    ],
                    'wrapperHeight' => '350px'
                ]);
                ?>

Seeing the source I found that only code for the single container only initiating not for the second one.

Please look on to this issue.
Registered for
image

image
image

@ihorchepurnyi
Copy link
Contributor

Hi, thanks, I will check it.

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

2 participants