我試圖嵌入谷歌地圖在使用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