google mapのマーカー表示が表示されません。
googlemapを2か所設置し、マーカーを表示したいのですが表示できず、
完成はマーカーを表示し、又、マーカーを画像にしたいです。
<div id="map1" style="width:1080px; height:500px"></div> <div id="map2" style="width:1080px; height:500px"></div> <script type="text/javascript"> function initMap() { var opts = { zoom: 15, center: new google.maps.LatLng(経度1, 緯度1) }; var opts2 = { zoom: 15, center: new google.maps.LatLng(経度2, 緯度2) }; var map = new google.maps.Map(document.getElementById("map1"), opts); var map2 = new google.maps.Map(document.getElementById("map2"), opts2); }; // Marker var marker = new google.maps.Marker( { map: map1 , icon: "accesspoint.png", position: new google.maps.LatLng( 経度1, 緯度1) , } ) ; var marker = new google.maps.Marker( { map: map2 , icon: "accesspoint.png", position: new google.maps.LatLng( 経度2, 緯度2) , } ) ; </script> <script src="https://maps.googleapis.com/maps/api/js?key=APIキー"></script> <script>initMap();</script>
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/20 06:42
2017/07/20 06:44
2017/07/20 06:47
2017/07/20 06:52