soiz1 commited on
Commit
5452636
·
verified ·
1 Parent(s): 354908c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -4
index.html CHANGED
@@ -221,7 +221,6 @@ function openEditor(e) {
221
  // ここから追加
222
  const icon = e.options.icon;
223
  if (icon && icon.options) {
224
- /*
225
  if (icon.options.iconUrl) {
226
  // URLから読み込むラジオボタンを選択
227
  document.querySelector('input[name="icon-source"][value="url"]').checked = true;
@@ -237,13 +236,12 @@ function openEditor(e) {
237
  document.querySelector('input[name="icon-source"][value="upload"]').checked = true;
238
  document.getElementById("icon-url-input").style.display = "none";
239
  document.getElementById("icon-upload-input").style.display = "block";
240
- document.getElementById("marker-icon-url").value = "https://unpkg.com/leaflet@1.9.3/dist/images/marker-icon-2x.png";
241
- document.getElementById("icon-preview").src = "https://unpkg.com/leaflet@1.9.3/dist/images/marker-icon-2x.png";
242
  document.getElementById("icon-preview").style.display = 'block';
243
  // 高さと幅の設定を表示
244
  document.getElementById("icon-settings").style.display = "block";
245
  }
246
- */
247
  document.getElementById("icon-width").value = icon.options.iconSize[0];
248
  document.getElementById("icon-height").value = icon.options.iconSize[1];
249
  document.getElementById("icon-width-value").textContent = icon.options.iconSize[0];
 
221
  // ここから追加
222
  const icon = e.options.icon;
223
  if (icon && icon.options) {
 
224
  if (icon.options.iconUrl) {
225
  // URLから読み込むラジオボタンを選択
226
  document.querySelector('input[name="icon-source"][value="url"]').checked = true;
 
236
  document.querySelector('input[name="icon-source"][value="upload"]').checked = true;
237
  document.getElementById("icon-url-input").style.display = "none";
238
  document.getElementById("icon-upload-input").style.display = "block";
239
+ document.getElementById("marker-icon-url").value = icon.options.iconUrl;
240
+ document.getElementById("icon-preview").src = icon.options.iconUrl;
241
  document.getElementById("icon-preview").style.display = 'block';
242
  // 高さと幅の設定を表示
243
  document.getElementById("icon-settings").style.display = "block";
244
  }
 
245
  document.getElementById("icon-width").value = icon.options.iconSize[0];
246
  document.getElementById("icon-height").value = icon.options.iconSize[1];
247
  document.getElementById("icon-width-value").textContent = icon.options.iconSize[0];