maps.google.com提供(pal5)・Google謹製のマーカー画像
Google Maps APIなど向けにGoogleがあらかじめ用意してある画像アイコンから、
maps.google.com/mapfiles/kml/pal5にて提供されている画像のURL指定し、
Google Maps APIで表示を行う例をご紹介します。
地図の表示
maps.google.com/mapfiles/kml/pal5提供のマーカーアイコンを配置しています。
なお、ここでは影アイコンを別で表示していますが、
本来影アイコンは同じマーカーに対して設定して利用します。
以下で、影アイコンの利用方法をご紹介しています。
maps.google.com/mapfiles/kml/pal5提供・Google謹製のマーカー画像
以下のアイコンが利用できます。
http://maps.google.com/mapfiles/kml/pal5/icon0.png
http://maps.google.com/mapfiles/kml/pal5/icon0s.png
http://maps.google.com/mapfiles/kml/pal5/icon1.png
http://maps.google.com/mapfiles/kml/pal5/icon1s.png
http://maps.google.com/mapfiles/kml/pal5/icon2.png
http://maps.google.com/mapfiles/kml/pal5/icon2s.png
http://maps.google.com/mapfiles/kml/pal5/icon3.png
http://maps.google.com/mapfiles/kml/pal5/icon3s.png
http://maps.google.com/mapfiles/kml/pal5/icon4.png
http://maps.google.com/mapfiles/kml/pal5/icon4s.png
http://maps.google.com/mapfiles/kml/pal5/icon5.png
http://maps.google.com/mapfiles/kml/pal5/icon5s.png
http://maps.google.com/mapfiles/kml/pal5/icon6.png
http://maps.google.com/mapfiles/kml/pal5/icon6s.png
http://maps.google.com/mapfiles/kml/pal5/icon7.png
http://maps.google.com/mapfiles/kml/pal5/icon7s.png
http://maps.google.com/mapfiles/kml/pal5/icon8.png
http://maps.google.com/mapfiles/kml/pal5/icon8s.png
http://maps.google.com/mapfiles/kml/pal5/icon9.png
http://maps.google.com/mapfiles/kml/pal5/icon9s.png
http://maps.google.com/mapfiles/kml/pal5/icon10.png
http://maps.google.com/mapfiles/kml/pal5/icon10s.png
http://maps.google.com/mapfiles/kml/pal5/icon11.png
http://maps.google.com/mapfiles/kml/pal5/icon11s.png
http://maps.google.com/mapfiles/kml/pal5/icon12.png
http://maps.google.com/mapfiles/kml/pal5/icon12s.png
http://maps.google.com/mapfiles/kml/pal5/icon13.png
http://maps.google.com/mapfiles/kml/pal5/icon13s.png
http://maps.google.com/mapfiles/kml/pal5/icon14.png
http://maps.google.com/mapfiles/kml/pal5/icon14s.png
http://maps.google.com/mapfiles/kml/pal5/icon15.png
http://maps.google.com/mapfiles/kml/pal5/icon15s.png
http://maps.google.com/mapfiles/kml/pal5/icon16.png
http://maps.google.com/mapfiles/kml/pal5/icon16s.png
http://maps.google.com/mapfiles/kml/pal5/icon17.png
http://maps.google.com/mapfiles/kml/pal5/icon17s.png
http://maps.google.com/mapfiles/kml/pal5/icon18.png
http://maps.google.com/mapfiles/kml/pal5/icon18s.png
http://maps.google.com/mapfiles/kml/pal5/icon19.png
http://maps.google.com/mapfiles/kml/pal5/icon19s.png
http://maps.google.com/mapfiles/kml/pal5/icon20.png
http://maps.google.com/mapfiles/kml/pal5/icon20s.png
http://maps.google.com/mapfiles/kml/pal5/icon21.png
http://maps.google.com/mapfiles/kml/pal5/icon21s.png
http://maps.google.com/mapfiles/kml/pal5/icon22.png
http://maps.google.com/mapfiles/kml/pal5/icon22s.png
http://maps.google.com/mapfiles/kml/pal5/icon23.png
http://maps.google.com/mapfiles/kml/pal5/icon23s.png
http://maps.google.com/mapfiles/kml/pal5/icon24.png
http://maps.google.com/mapfiles/kml/pal5/icon24s.png
http://maps.google.com/mapfiles/kml/pal5/icon25.png
http://maps.google.com/mapfiles/kml/pal5/icon25s.png
http://maps.google.com/mapfiles/kml/pal5/icon26.png
http://maps.google.com/mapfiles/kml/pal5/icon26s.png
http://maps.google.com/mapfiles/kml/pal5/icon27.png
http://maps.google.com/mapfiles/kml/pal5/icon27s.png
http://maps.google.com/mapfiles/kml/pal5/icon28.png
http://maps.google.com/mapfiles/kml/pal5/icon28s.png
http://maps.google.com/mapfiles/kml/pal5/icon29.png
http://maps.google.com/mapfiles/kml/pal5/icon29s.png
http://maps.google.com/mapfiles/kml/pal5/icon30.png
http://maps.google.com/mapfiles/kml/pal5/icon30s.png
http://maps.google.com/mapfiles/kml/pal5/icon31.png
http://maps.google.com/mapfiles/kml/pal5/icon31s.png
http://maps.google.com/mapfiles/kml/pal5/icon32.png
http://maps.google.com/mapfiles/kml/pal5/icon32s.png
http://maps.google.com/mapfiles/kml/pal5/icon33.png
http://maps.google.com/mapfiles/kml/pal5/icon33s.png
http://maps.google.com/mapfiles/kml/pal5/icon34.png
http://maps.google.com/mapfiles/kml/pal5/icon34s.png
http://maps.google.com/mapfiles/kml/pal5/icon35.png
http://maps.google.com/mapfiles/kml/pal5/icon35s.png
http://maps.google.com/mapfiles/kml/pal5/icon36.png
http://maps.google.com/mapfiles/kml/pal5/icon36s.png
http://maps.google.com/mapfiles/kml/pal5/icon37.png
http://maps.google.com/mapfiles/kml/pal5/icon37s.png
http://maps.google.com/mapfiles/kml/pal5/icon38.png
http://maps.google.com/mapfiles/kml/pal5/icon38s.png
http://maps.google.com/mapfiles/kml/pal5/icon39.png
http://maps.google.com/mapfiles/kml/pal5/icon39s.png
http://maps.google.com/mapfiles/kml/pal5/icon40.png
http://maps.google.com/mapfiles/kml/pal5/icon40s.png
http://maps.google.com/mapfiles/kml/pal5/icon41.png
http://maps.google.com/mapfiles/kml/pal5/icon41s.png
http://maps.google.com/mapfiles/kml/pal5/icon42.png
http://maps.google.com/mapfiles/kml/pal5/icon42s.png
http://maps.google.com/mapfiles/kml/pal5/icon43.png
http://maps.google.com/mapfiles/kml/pal5/icon43s.png
http://maps.google.com/mapfiles/kml/pal5/icon44.png
http://maps.google.com/mapfiles/kml/pal5/icon44s.png
http://maps.google.com/mapfiles/kml/pal5/icon45.png
http://maps.google.com/mapfiles/kml/pal5/icon45s.png
http://maps.google.com/mapfiles/kml/pal5/icon46.png
http://maps.google.com/mapfiles/kml/pal5/icon46s.png
http://maps.google.com/mapfiles/kml/pal5/icon47.png
http://maps.google.com/mapfiles/kml/pal5/icon47s.png
http://maps.google.com/mapfiles/kml/pal5/icon48.png
http://maps.google.com/mapfiles/kml/pal5/icon48s.png
http://maps.google.com/mapfiles/kml/pal5/icon49.png
http://maps.google.com/mapfiles/kml/pal5/icon49s.png
http://maps.google.com/mapfiles/kml/pal5/icon50.png
http://maps.google.com/mapfiles/kml/pal5/icon50s.png
http://maps.google.com/mapfiles/kml/pal5/icon51.png
http://maps.google.com/mapfiles/kml/pal5/icon51s.png
http://maps.google.com/mapfiles/kml/pal5/icon52.png
http://maps.google.com/mapfiles/kml/pal5/icon52s.png
http://maps.google.com/mapfiles/kml/pal5/icon53.png
http://maps.google.com/mapfiles/kml/pal5/icon53s.png
http://maps.google.com/mapfiles/kml/pal5/icon54.png
http://maps.google.com/mapfiles/kml/pal5/icon54s.png
http://maps.google.com/mapfiles/kml/pal5/icon55.png
http://maps.google.com/mapfiles/kml/pal5/icon55s.png
http://maps.google.com/mapfiles/kml/pal5/icon56.png
http://maps.google.com/mapfiles/kml/pal5/icon56s.png
http://maps.google.com/mapfiles/kml/pal5/icon57.png
http://maps.google.com/mapfiles/kml/pal5/icon57s.png
http://maps.google.com/mapfiles/kml/pal5/icon58.png
http://maps.google.com/mapfiles/kml/pal5/icon58s.png
http://maps.google.com/mapfiles/kml/pal5/icon59.png
http://maps.google.com/mapfiles/kml/pal5/icon59s.png
http://maps.google.com/mapfiles/kml/pal5/icon60.png
http://maps.google.com/mapfiles/kml/pal5/icon60s.png
http://maps.google.com/mapfiles/kml/pal5/icon61.png
http://maps.google.com/mapfiles/kml/pal5/icon61s.png
http://maps.google.com/mapfiles/kml/pal5/icon62.png
http://maps.google.com/mapfiles/kml/pal5/icon62s.png
http://maps.google.com/mapfiles/kml/pal5/icon63.png
http://maps.google.com/mapfiles/kml/pal5/icon63s.png
JavaScript
上記で埋込表示しているソースは以下を利用しています。
URLを一括で抜きたい場合は以下の方が便利かもしれません。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
<script type="text/javascript"> function init(){ var map_div = document.getElementById("gmap_canvas"); var gmap_canvas = new google.maps.Map(map_div,{ center: new google.maps.LatLng(31.97000,134.09500), zoom : 12, mapTypeId : google.maps.MapTypeId.ROADMAP }); var dat = getdata(); for (var d in dat) { console.log(dat[d]); var tmp = create_marker({ map: gmap_canvas, position: new google.maps.LatLng(dat[d][0],dat[d][1]), icon: dat[d][2] }); } } function create_marker(options){ var m = new google.maps.Marker(options); return m; } function getdata(){ var data = [ [32.00000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon0.png"], [32.00000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon0s.png"], [32.00000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon1.png"], [32.00000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon1s.png"], [32.00000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon2.png"], [32.00000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon2s.png"], [32.00000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon3.png"], [32.00000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon3s.png"], [32.00000,134.08000,"http://maps.google.com/mapfiles/kml/pal5/icon4.png"], [32.00000,134.09000,"http://maps.google.com/mapfiles/kml/pal5/icon4s.png"], [32.00000,134.10000,"http://maps.google.com/mapfiles/kml/pal5/icon5.png"], [32.00000,134.11000,"http://maps.google.com/mapfiles/kml/pal5/icon5s.png"], [32.00000,134.12000,"http://maps.google.com/mapfiles/kml/pal5/icon6.png"], [32.00000,134.13000,"http://maps.google.com/mapfiles/kml/pal5/icon6s.png"], [32.00000,134.14000,"http://maps.google.com/mapfiles/kml/pal5/icon7.png"], [32.00000,134.15000,"http://maps.google.com/mapfiles/kml/pal5/icon7s.png"], [32.00000,134.16000,"http://maps.google.com/mapfiles/kml/pal5/icon8.png"], [32.00000,134.17000,"http://maps.google.com/mapfiles/kml/pal5/icon8s.png"], [32.00000,134.18000,"http://maps.google.com/mapfiles/kml/pal5/icon9.png"], [32.00000,134.19000,"http://maps.google.com/mapfiles/kml/pal5/icon9s.png"], [31.99000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon10.png"], [31.99000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon10s.png"], [31.99000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon11.png"], [31.99000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon11s.png"], [31.99000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon12.png"], [31.99000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon12s.png"], [31.99000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon13.png"], [31.99000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon13s.png"], [31.99000,134.08000,"http://maps.google.com/mapfiles/kml/pal5/icon14.png"], [31.99000,134.09000,"http://maps.google.com/mapfiles/kml/pal5/icon14s.png"], [31.99000,134.10000,"http://maps.google.com/mapfiles/kml/pal5/icon15.png"], [31.99000,134.11000,"http://maps.google.com/mapfiles/kml/pal5/icon15s.png"], [31.99000,134.12000,"http://maps.google.com/mapfiles/kml/pal5/icon16.png"], [31.99000,134.13000,"http://maps.google.com/mapfiles/kml/pal5/icon16s.png"], [31.99000,134.14000,"http://maps.google.com/mapfiles/kml/pal5/icon17.png"], [31.99000,134.15000,"http://maps.google.com/mapfiles/kml/pal5/icon17s.png"], [31.99000,134.16000,"http://maps.google.com/mapfiles/kml/pal5/icon18.png"], [31.99000,134.17000,"http://maps.google.com/mapfiles/kml/pal5/icon18s.png"], [31.99000,134.18000,"http://maps.google.com/mapfiles/kml/pal5/icon19.png"], [31.99000,134.19000,"http://maps.google.com/mapfiles/kml/pal5/icon19s.png"], [31.98000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon20.png"], [31.98000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon20s.png"], [31.98000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon21.png"], [31.98000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon21s.png"], [31.98000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon22.png"], [31.98000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon22s.png"], [31.98000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon23.png"], [31.98000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon23s.png"], [31.98000,134.08000,"http://maps.google.com/mapfiles/kml/pal5/icon24.png"], [31.98000,134.09000,"http://maps.google.com/mapfiles/kml/pal5/icon24s.png"], [31.98000,134.10000,"http://maps.google.com/mapfiles/kml/pal5/icon25.png"], [31.98000,134.11000,"http://maps.google.com/mapfiles/kml/pal5/icon25s.png"], [31.98000,134.12000,"http://maps.google.com/mapfiles/kml/pal5/icon26.png"], [31.98000,134.13000,"http://maps.google.com/mapfiles/kml/pal5/icon26s.png"], [31.98000,134.14000,"http://maps.google.com/mapfiles/kml/pal5/icon27.png"], [31.98000,134.15000,"http://maps.google.com/mapfiles/kml/pal5/icon27s.png"], [31.98000,134.16000,"http://maps.google.com/mapfiles/kml/pal5/icon28.png"], [31.98000,134.17000,"http://maps.google.com/mapfiles/kml/pal5/icon28s.png"], [31.98000,134.18000,"http://maps.google.com/mapfiles/kml/pal5/icon29.png"], [31.98000,134.19000,"http://maps.google.com/mapfiles/kml/pal5/icon29s.png"], [31.97000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon30.png"], [31.97000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon30s.png"], [31.97000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon31.png"], [31.97000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon31s.png"], [31.97000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon32.png"], [31.97000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon32s.png"], [31.97000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon33.png"], [31.97000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon33s.png"], [31.97000,134.08000,"http://maps.google.com/mapfiles/kml/pal5/icon34.png"], [31.97000,134.09000,"http://maps.google.com/mapfiles/kml/pal5/icon34s.png"], [31.97000,134.10000,"http://maps.google.com/mapfiles/kml/pal5/icon35.png"], [31.97000,134.11000,"http://maps.google.com/mapfiles/kml/pal5/icon35s.png"], [31.97000,134.12000,"http://maps.google.com/mapfiles/kml/pal5/icon36.png"], [31.97000,134.13000,"http://maps.google.com/mapfiles/kml/pal5/icon36s.png"], [31.97000,134.14000,"http://maps.google.com/mapfiles/kml/pal5/icon37.png"], [31.97000,134.15000,"http://maps.google.com/mapfiles/kml/pal5/icon37s.png"], [31.97000,134.16000,"http://maps.google.com/mapfiles/kml/pal5/icon38.png"], [31.97000,134.17000,"http://maps.google.com/mapfiles/kml/pal5/icon38s.png"], [31.97000,134.18000,"http://maps.google.com/mapfiles/kml/pal5/icon39.png"], [31.97000,134.19000,"http://maps.google.com/mapfiles/kml/pal5/icon39s.png"], [31.96000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon40.png"], [31.96000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon40s.png"], [31.96000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon41.png"], [31.96000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon41s.png"], [31.96000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon42.png"], [31.96000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon42s.png"], [31.96000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon43.png"], [31.96000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon43s.png"], [31.96000,134.08000,"http://maps.google.com/mapfiles/kml/pal5/icon44.png"], [31.96000,134.09000,"http://maps.google.com/mapfiles/kml/pal5/icon44s.png"], [31.96000,134.10000,"http://maps.google.com/mapfiles/kml/pal5/icon45.png"], [31.96000,134.11000,"http://maps.google.com/mapfiles/kml/pal5/icon45s.png"], [31.96000,134.12000,"http://maps.google.com/mapfiles/kml/pal5/icon46.png"], [31.96000,134.13000,"http://maps.google.com/mapfiles/kml/pal5/icon46s.png"], [31.96000,134.14000,"http://maps.google.com/mapfiles/kml/pal5/icon47.png"], [31.96000,134.15000,"http://maps.google.com/mapfiles/kml/pal5/icon47s.png"], [31.96000,134.16000,"http://maps.google.com/mapfiles/kml/pal5/icon48.png"], [31.96000,134.17000,"http://maps.google.com/mapfiles/kml/pal5/icon48s.png"], [31.96000,134.18000,"http://maps.google.com/mapfiles/kml/pal5/icon49.png"], [31.96000,134.19000,"http://maps.google.com/mapfiles/kml/pal5/icon49s.png"], [31.95000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon50.png"], [31.95000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon50s.png"], [31.95000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon51.png"], [31.95000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon51s.png"], [31.95000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon52.png"], [31.95000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon52s.png"], [31.95000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon53.png"], [31.95000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon53s.png"], [31.95000,134.08000,"http://maps.google.com/mapfiles/kml/pal5/icon54.png"], [31.95000,134.09000,"http://maps.google.com/mapfiles/kml/pal5/icon54s.png"], [31.95000,134.10000,"http://maps.google.com/mapfiles/kml/pal5/icon55.png"], [31.95000,134.11000,"http://maps.google.com/mapfiles/kml/pal5/icon55s.png"], [31.95000,134.12000,"http://maps.google.com/mapfiles/kml/pal5/icon56.png"], [31.95000,134.13000,"http://maps.google.com/mapfiles/kml/pal5/icon56s.png"], [31.95000,134.14000,"http://maps.google.com/mapfiles/kml/pal5/icon57.png"], [31.95000,134.15000,"http://maps.google.com/mapfiles/kml/pal5/icon57s.png"], [31.95000,134.16000,"http://maps.google.com/mapfiles/kml/pal5/icon58.png"], [31.95000,134.17000,"http://maps.google.com/mapfiles/kml/pal5/icon58s.png"], [31.95000,134.18000,"http://maps.google.com/mapfiles/kml/pal5/icon59.png"], [31.95000,134.19000,"http://maps.google.com/mapfiles/kml/pal5/icon59s.png"], [31.94000,134.00000,"http://maps.google.com/mapfiles/kml/pal5/icon60.png"], [31.94000,134.01000,"http://maps.google.com/mapfiles/kml/pal5/icon60s.png"], [31.94000,134.02000,"http://maps.google.com/mapfiles/kml/pal5/icon61.png"], [31.94000,134.03000,"http://maps.google.com/mapfiles/kml/pal5/icon61s.png"], [31.94000,134.04000,"http://maps.google.com/mapfiles/kml/pal5/icon62.png"], [31.94000,134.05000,"http://maps.google.com/mapfiles/kml/pal5/icon62s.png"], [31.94000,134.06000,"http://maps.google.com/mapfiles/kml/pal5/icon63.png"], [31.94000,134.07000,"http://maps.google.com/mapfiles/kml/pal5/icon63s.png"] ]; return data; } google.maps.event.addDomListener(window,"load",init); $('#ver').text(google.maps.version); </script> |
参考
公開日:
最終更新日:2017/01/13