Add title to marker
This commit is contained in:
parent
2619b450b5
commit
23537782d6
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,7 @@
|
|||
$places = get_field('orte');
|
||||
if($places){
|
||||
foreach ($places as $place){
|
||||
$locations[] = array_merge(array("post" => $post->ID), $place);
|
||||
$locations[] = array_merge(array("post" => $post->ID, "title" => $post->post_title), $place);
|
||||
}
|
||||
}
|
||||
endwhile;
|
||||
|
|
@ -89,6 +89,7 @@
|
|||
for(var i = 0; i < places.length; i++){
|
||||
var marker = new google.maps.Marker({
|
||||
position: {lat: parseFloat(places[i]['lat']), lng: parseFloat(places[i]['lng']) },
|
||||
title: places[i]['title'],
|
||||
map: map
|
||||
});
|
||||
marker.setVisible(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue