I created a map showing traffic with the google maps javascript API using the TrafficLayer object. A googlmaps.com-generated map of the same area displays waze incident icons, but they do not show up on my map. Is there a way to include the incident markers when generating the traffic map? Here is my code:
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 37.794086, lng: -122.400445},
zoom: 12
});
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=xxxxxxxx&callback=initMap"
async defer></script>
At present it is impossible to add layer with incidents / constructions markers on the google traffic map.
Discussion on this topic takes place since 2010 and is available on the site: https://code.google.com/p/gmaps-api-issues/issues/detail?id=2411
It remains to wait for the response of the google developers.