[英]How do I add waze incident markers to a google maps javascript API-generated map with traffic?
I created a map showing traffic with the google maps javascript API using the TrafficLayer object. 我使用TrafficLayer对象通过google maps javascript API创建了一个显示交通的地图。 A googlmaps.com-generated map of the same area displays waze incident icons, but they do not show up on my map.
由googlmaps.com生成的同一区域的地图显示位智偶发图标,但它们未显示在我的地图上。 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. 目前,无法在Google交通地图上添加带有事件/构造标记的图层。
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 该主题的讨论自2010年以来进行,可以在以下网站上进行讨论: https : //code.google.com/p/gmaps-api-issues/issues/detail?id=2411
It remains to wait for the response of the google developers. 它仍然在等待谷歌开发人员的回应。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.