yii2-google-maps-markers
yii2-google-maps-markers copied to clipboard
Multiple Maps on same page not working
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
Hi, thanks, I will check it.