【发布时间】:2020-01-24 04:58:34
【问题描述】:
我想在谷歌地图信息窗口中单击电子邮件 ID 时打开带有预填充主题“SUBJECT”的电子邮件应用程序。下面是我写的显示电子邮件 ID 的代码,我不知道如何继续。
function init(resp) {
var mapProp = {
center : new google.maps.LatLng(resp.data[0].Lat,
resp.data[0].Lon),
zoom : 7,
};
var map = new google.maps.Map(document.getElementById("googleMap"),
mapProp);
$.each(resp.data, function(index, value) {
var myLatlng = new google.maps.LatLng(value.Lat, value.Lon);
var marker = new google.maps.Marker({
position : myLatlng,
label : value['Number'],
content : "Phone: " + value['Phone Number'] + '<br>'
+ "E-Mail: " + '<a href="'+ value['E-Mail']+'">'+ value['E-Mail'] +'</a>'
});
var infowindow = new google.maps.InfoWindow({
content : "Phone: " + value['Phone Number'] + '<br>'
+ "E-Mail: " + '<a href="'+ value['E-Mail']+'">'+ value['E-Mail'] +'</a>'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map, marker);
});
// To add the marker to the map, call setMap();
marker.setMap(map);
});
【问题讨论】:
标签: javascript google-maps google-maps-api-3