【发布时间】:2012-06-21 22:33:51
【问题描述】:
我想知道是否有办法使用 zipcode 代替 Lat 和 Lng,使用这个 sn-p 或使用 Geocoding Requests。
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(22.1482635,-100.9100755);
// var latlang = new google.maps.zipcode(7845); <- Is there a way to do that?
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var marker = new google.maps.Marker({
position: latlng,
map: map,
title:"zipcode"
});
}
</script>
【问题讨论】:
标签: google-maps maps zipcode