我试图嵌入谷歌地图在使用google API
我的网站,我得到API key
并写了下面的jQuery:Embeding谷歌地图的网站
function LoadMap(){
$.getScript("http://maps.googleapis.com/maps/api/js?key=AIzaSyChZeTZ-DzMW-45IUBXUSuBha9MWEiXXtI&sensor=true", function() {
var myOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("id"), myOptions);
});
}
但是,这不加载在DIV地图的给定有人可以帮我解决这个问题吗?
感谢答复,但gmap.js不工作 –
试试这个https://gist.github.com/828536 – deerua