PrumeClusterのアイコンを自前で作成したものを使う方法

とかとか作ったので、これをPrumeClusterで使いたいときの、JavaScriptの書き方

if (obj.id == 0){  // idが未登録の場合
			console.log("obj.id == 0")
			// データをマーカーとして登録
			// var marker = new PruneCluster.Marker(obj.lat, obj.lng);

			// 参考資料  http://embed.plnkr.co/WmtpkEqSDJFuFeuiYP54/
			//var marker = new PruneCluster.Marker(obj.lat, obj.lng);
			var marker = new PruneCluster.Marker(obj.lat, obj.lng, {
				popup: "Bell 206 ",
				icon: L.icon({
					//iconUrl: 'http://sintef-9012.github.io/PruneCluster/examples/helicopter.png', 
					iconUrl: 'http://localhost:8080/static/person-icon.png', 
					//iconUrl: 'helicopter.png', 
					//iconSize: [48, 48] 
				})
			});

2022/01,江端さんの技術メモ

Posted by ebata