質問編集履歴

1

DOMAPIの定義し直し箇所を修正

2022/08/05 08:19

投稿

sekiishi
sekiishi

スコア0

test CHANGED
File without changes
test CHANGED
@@ -78,22 +78,6 @@
78
78
  myWindow = window.open("", "myWindow", "width=600px,height=600px");
79
79
  myWindow.document.write("<div id='map' style='width:100%;height:100%'></div>");
80
80
 
81
- // ヘッダに要素を追加します
82
- function load(src) {
83
- var head = myWindow.document.getElementsByTagName('head')[0];
84
- var script = myWindow.document.createElement('script');
85
- script.type = 'text/javascript';
86
- script.src = src;
87
- head.appendChild(script);
88
- }
89
-
90
- // Google Map を Load します
91
- // document.write を定義します
92
- var nativeWrite = myWindow.document.write;
93
- myWindow.document.write = function (html) {
94
- var m = html.match(/script.+src="([^"]+)"/);
95
- if (m) { load(m[1]); } else { nativeWrite(html); }
96
- };
97
81
  var point = new google.maps.LatLng(lat[0], lng[0]);
98
82
  // 地図の表示の設定(中心の位置、ズームサイズ等)を設定します
99
83
  var opts = {