Innerhalb der Schleife können sich die Koordinaten ändern (ich schreibe für dieses Beispiel nur eine Konstante)
Ich habe es versucht. Das Modal erscheint, aber nicht die Karte.
Vielen Dank
meine Schleife
Code: Select all
$i = 0;
foreach ($result as $value) {
$geolocalisation = '
' . Core::getDef('modules_test') . ' |
-----
';
Code: Select all
$geolocalisation .= '
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(51.219987, 4.396237),
zoom: 12,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapCanvas"),
mapOptions);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(51.219987, 4.396237)
});
marker.setMap(map);
}
';
$methods[]= ['id' => $value->id,
'title' => '
' . $value->name . ' ' . $value->address . ' ' . $value->addressOptional . ' ' . $value->locality. ' ' . $value->city . ' ' . $value->postalCode . ' ' . $value->partialClosed . ' ' . $geolocalisation,
'cost' => 5.50
];
$i++;
}
Mobile version