function log() { } function showMapProcess(func) { } function showMap() { showMapProcess( function(point) { // 地図表示に関するオプション var mapOptions = { zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP, center: new google.maps.LatLng(point.lat(), point.lng()) }; // 地図を表示させるインスタンスを生成 var map = new google.maps.Map(document.getElementById("googlemap"), mapOptions); //map.setCenter(point); } ); } function showStaticMap() { showMapProcess( function(point) { var url = "https://maps.googleapis.com/maps/api/staticmap?center="+point.toUrlValue()+"&zoom=16&size=160x160&key=AIzaSyB0vZjDy0o1PR9JM42Yo8YBMxaroZBxStI&sensor=false"; $("#googlestaticmap").attr('src',url); } ); } function setHref(obj) { showMapProcess( function(point) { var url = "//maps.google.com/maps?q="+point.toUrlValue()+"&zoom=16"; obj.attr('href',url); } ); }