質問編集履歴
7
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
お世話になります。
|
2
2
|
|
3
|
-
leaflet: 1.6.0
|
4
|
-
|
5
3
|
leafletで表示させているマーカーでクリックするとポップアップが表示されます。
|
6
4
|
このマーカーはcanvasで描画していて、
|
7
5
|
サイズを動的に変更出来るようにしています。
|
@@ -16,6 +14,8 @@
|
|
16
14
|
|
17
15
|
よろしくお願いいたします。
|
18
16
|
|
17
|
+
leaflet: 1.6.0
|
18
|
+
|
19
19
|
```ここに言語を入力
|
20
20
|
<!DOCTYPE html>
|
21
21
|
<html lang="ja" id="map-html">
|
6
syuusei
title
CHANGED
File without changes
|
body
CHANGED
@@ -65,7 +65,6 @@
|
|
65
65
|
closeButton: true,
|
66
66
|
popupOpen: true,
|
67
67
|
autoClose: false
|
68
|
-
// }).setContent(feature.properties.name + '<br />' + feature.properties.households);
|
69
68
|
}).setLatLng(marker.letlng).setContent('test').openOn(map);
|
70
69
|
|
71
70
|
}).addTo(this.marker_layer)
|
5
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
<div><input id="marker_size" type="range" min="1" max="100"></div>
|
37
37
|
</div>
|
38
38
|
|
39
|
-
<div id="map" style="width:
|
39
|
+
<div id="map" style="width: 100vw; height: 100vh;"></div>
|
40
40
|
|
41
41
|
<script
|
42
42
|
src="https://code.jquery.com/jquery-3.4.1.js"
|
4
修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
leafletでマーカーをcanvas
|
1
|
+
leafletでマーカーをcanvasで描画している時、マーカーサイズを動的に変更するとイベントの判定がおかしくなる
|
body
CHANGED
File without changes
|
3
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,7 +29,6 @@
|
|
29
29
|
<meta http-equiv="Expires" content="0">
|
30
30
|
<title>title</title>
|
31
31
|
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" rel="stylesheet">
|
32
|
-
<link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/images/layers-2x.png">
|
33
32
|
<body>
|
34
33
|
|
35
34
|
<div id="optionmenu">
|
2
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
お
|
1
|
+
お世話になります。
|
2
2
|
|
3
3
|
leaflet: 1.6.0
|
4
4
|
|
@@ -6,10 +6,10 @@
|
|
6
6
|
このマーカーはcanvasで描画していて、
|
7
7
|
サイズを動的に変更出来るようにしています。
|
8
8
|
|
9
|
-
サイズを動的に変更するとクリックイベントの範囲が実際の円よりも広い判定になって
|
9
|
+
サイズを動的に変更するとクリックイベントの範囲が実際の円よりも広い判定になってしまい、
|
10
10
|
困っております。
|
11
11
|
マーカーをDOMで描画している場合サイズを変更しても問題ありません。
|
12
|
-
canvasで描画しながらマーカーサイズを変更してもイベントの判定を円の範囲内にしたいです。
|
12
|
+
canvasで描画しながらマーカーサイズを変更してもイベントの判定を円の範囲内にしたいのですが、方法はありますでしょうか。
|
13
13
|
|
14
14
|
以下コードを記載します。
|
15
15
|
そのままコピーペーストで動作します。
|
1
あ
title
CHANGED
File without changes
|
body
CHANGED
@@ -52,7 +52,7 @@
|
|
52
52
|
marker_size : 8,
|
53
53
|
marker_layer: {},
|
54
54
|
letlng: [35, 139],
|
55
|
-
set: function (
|
55
|
+
set: function () {
|
56
56
|
L.circleMarker(
|
57
57
|
marker.letlng,
|
58
58
|
{
|