从我的谷歌地图中提取图像 [英] extract image from my google map
本文介绍了从我的谷歌地图中提取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hello, sorry for asking too many questions but I am blocked and the clock is ticking me
I have a google map inserted in a asp.net page, I filled a dropdownlist, I select an item from the list, I locate on the map, I put a marker, I displays an info window on the map
I need your help to extract the current image of my card and give the user the option to save it
function findAddress() {
var address = document.getElementById("ddlAdr").value;
// script uses our 'geocoder' in order to find location by address name
geocoder.geocode({ 'address': address }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) { // and, if everything is ok
// we will center map
var addrLocation = results[0].geometry.location;
map.setCenter(addrLocation);
// store current coordinates into hidden variables
document.getElementById('lat').value = results[0].geometry.location.$a;
document.getElementById('lng').value = results[0].geometry.location.ab;
// and then - add new custom marker
var addrMarker = new google.maps.Marker({
position: addrLocation,
map: map,
title: results[0].formatted_address
});
} else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
}
感谢您的帮助
Thanks for your help
推荐答案
a ;
document .getElementById(' lng').value = results [ 0 ]。geometry。 location .ab;
// 然后 - 添加新的自定义标记
< span class =code-keyword> var addrMarker = new google.maps.Marker({
position:addrLocation,
map:map,
title:results [ 0 ] .formad_address
});
} else {
alert(' Geocode由于以下原因未成功:' + status);
}
});
}
a; document.getElementById('lng').value = results[0].geometry.location.ab; // and then - add new custom marker var addrMarker = new google.maps.Marker({ position: addrLocation, map: map, title: results[0].formatted_address }); } else { alert('Geocode was not successful for the following reason: ' + status); } }); }
感谢您的帮助
Thanks for your help
这篇关于从我的谷歌地图中提取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文