var map;
var latlng;
let _zoom = 15;
$(window).on('load',function(){
initialize();
});
function initialize(_lat,_lng) {
if (window.matchMedia("(max-width: 640px)").matches) {
_zoom = 14;
} else {
}
//function initialize(_latlng) {
//latlng = new google.maps.LatLng(33.680695073896004, 130.4889199682513); //緯度・経度
_latlng = new google.maps.LatLng(33.68099543038505, 130.48847602932094); //緯度・経度
latlng1 = new google.maps.LatLng(33.6746831389441, 130.48579811540714); //緯度・経度
latlng2 = new google.maps.LatLng(33.67408492544214, 130.48465817663012); //緯度・経度
latlng2 = new google.maps.LatLng(33.684241558987615, 130.49098379133775); //緯度・経度
var myOptions = {
zoom: _zoom, //拡大倍率
//center: latlng,
center: _latlng,
disableDefaultUI: true,
zoomControl: true,
zoomControlOptions: {
position: google.maps.ControlPosition.LEFT_CENTER
},
mapTypeControl: false,
scaleControl: false,
streetViewControl: true,
streetViewControlOptions: {
position: google.maps.ControlPosition.LEFT_CENTER
},
rotateControl: false,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.ROADMAP //地図の種類
};
map = new google.maps.Map(document.getElementById("gmap"), myOptions); //地図を表示
var marker = new google.maps.Marker({
icon: new google.maps.MarkerImage(
'https://evance-f.com/wp-content/themes/evance/img/top/pin.png', //画像ファイルのパス
new google.maps.Size(180,80), //アイコンの表示サイズ(縦,横)
new google.maps.Point(0,0)
),
position : latlng1,
map : map
});
var marker2 = new google.maps.Marker({
icon: new google.maps.MarkerImage(
'https://evance-f.com/wp-content/themes/evance/img/top/pin2.png', //画像ファイルのパス
new google.maps.Size(180,95), //アイコンの表示サイズ(縦,横)
new google.maps.Point(0,0)
),
position : latlng2,
map : map
});
}