diff --git a/page-stats.php b/page-stats.php index 93a544b..834d40b 100644 --- a/page-stats.php +++ b/page-stats.php @@ -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);