$coord = new LatLng(['lat' => 48.3175245000, 'lng' => 2.0921782000]);
// Lets add a marker now
$marker = new Marker([
'position' => $coord,
'title' => 'Titre 1',
]);
// Provide a shared InfoWindow to the marker
$infoWin = new InfoWindow([
'content' => '
Hello, how I can display the InfoWindow of all markers by default. Thank you. My code is:
$coord = new LatLng(['lat' => 48.866667, 'lng' => 2.333333]); // --------------------------------------------------- $map = new Map([ 'center' => $coord, 'zoom' => 14, ]); // Lets add a marker now $marker = new Marker([ 'position' => $coord, 'title' => 'Titre 1', ]); // Provide a shared InfoWindow to the marker $infoWin = new InfoWindow([ 'content' => '
This is title
' ]); // $infoWin->setOptions(new InfoWindowOptions(['visible'=>true])); $marker->attachInfoWindow($infoWin); $map->addOverlay($marker); // ---------------------------------------------------$coord = new LatLng(['lat' => 48.3175245000, 'lng' => 2.0921782000]); // Lets add a marker now $marker = new Marker([ 'position' => $coord, 'title' => 'Titre 1', ]); // Provide a shared InfoWindow to the marker $infoWin = new InfoWindow([ 'content' => '
This is title
' ]); // $infoWin->setOptions(new InfoWindowOptions(['visible'=>true])); $marker->attachInfoWindow($infoWin); $map->addOverlay($marker); // ---------------------------------------------------// Display the map -finally :) echo $map->display();