**Index [#pd37056f]
地図をたくさん張ると結構重いのでサンプルだけページを分離した。
#contents

さらに追加→[[PukiwikiでGoogleMaps2サンプル2]]

**サンプル [#k63c02b5]

***リスト [#rc281c1d]
&googlemaps2(width=300px, height=200px, mapctrl=small, usetool=1);

&googlemaps2_icon(神社, image=http://reddog.s35.xrea.com/img/googlemaps/mm_sample.png, shadow=http://www.google.com/mapfiles/shadow50.png, iw=20, ih=34, sw=37, sh=34, ianchorx=10, ianchory=34, sanchorx=10, area="1 7 7 0 13 0 19 7 19 12 13 20 12 23 11 34 9 34 8 23 6 19 1 13 1 7", transparent=http://reddog.s35.xrea.com/img/googlemaps/transparent.png);

-&googlemaps2_mark(35.039379, 135.729248, title=金閣寺, caption=足利義満の別荘。先日変な男が光ケーブルを接続するために車で突っ込んだ。東側の門は暇そうな警備員が守りを固めている。(長文サンプル), image=http://reddog.s35.xrea.com/img/googlemaps/img_kinkaku.jpg);~
-&googlemaps2_mark(35.031087, 135.735106, title=北野天満宮, caption=菅原道真を祭ってる, icon=神社);~
-&googlemaps2_mark(35.028723, 135.712963, title=仁和寺,caption=和尚が名物(嘘));~
-&googlemaps2_mark(35.034477, 135.718348, title=龍安寺,caption=石庭のうずまきが有名);~

 &googlemaps2(width=300px, height=200px, mapctrl=small);
 
 &googlemaps2_icon(神社, image=ihttp://reddog.s35.xrea.com/img/googlemaps/mm_sample.png, shadow=http://www.google.com/mapfiles/shadow50.png, iw=20, ih=34, sw=37, sh=34, ianchorx=10, ianchory=34, sanchorx=10, area="1 7 7 0 13 0 19 7 19 12 13 20 12 23 11 34 9 34 8 23 6 19 1 13 1 7", transparent=http://reddog.s35.xrea.com/img/googlemaps/transparent.png);
 
 -&googlemaps2_mark(35.039379, 135.729248, title=金閣寺, caption=足利義満の別荘。先日変な男が光ケーブルを接続するために車で突っ込んだ。東側の門は暇そうな警備員が守りを固めている。(長文サンプル), image=http://reddog.s35.xrea.com/img/googlemaps/img_kinkaku.jpg);~
 -&googlemaps2_mark(35.031087, 135.735106, title=北野天満宮, caption=菅原道真を祭ってる, icon=神社);~
 -&googlemaps2_mark(35.028723, 135.712963, title=仁和寺,caption=和尚が名物(嘘));~
 -&googlemaps2_mark(35.034477, 135.718348, title=龍安寺,caption=石庭のうずまきが有名);~


***複数の地図の表示 [#qfd21b17]
|&googlemaps2(mapname=tmap0, lat=35.128982, lng=135.765094, width=100px, height=100px, mapctrl=smallzoom, type=n, typectrl=none, zoom=16);|&googlemaps2(mapname=tmap1, lat=35.058877, lng=135.780415, width=100px, height=100px, mapctrl=smallzoom, type=n, typectrl=none, zoom=16);|&googlemaps2(mapname=tmap2, lat=35.025717, lng=135.743486, width=100px, height=100px, mapctrl=smallzoom, type=n, typectrl=none, zoom=16);|
|CENTER:貴船神社奥宮|CENTER:宝ヶ池|CENTER:西陣京極|

 |&googlemaps2(mapname=tmap0, lat=35.128982, lng=135.765094, width=100px, height=100px, mapctrl=smallzoom, type=n, typectrl=none, zoom=16);|&googlemaps2(mapname=tmap1, lat=35.058877, lng=135.780415, width=100px, height=100px, mapctrl=smallzoom, type=n, typectrl=none, zoom=16);|&googlemaps2(mapname=tmap2, lat=35.025717, lng=135.743486, width=100px, height=100px, mapctrl=smallzoom, type=n, typectrl=none, zoom=16);|
 |CENTER:貴船神社奥宮|CENTER:宝ヶ池|CENTER:西陣京極|
あまりたくさんにすると重くなるのでほどほどにしたほうがいいような。


***アイコンの無いマーカーとマーカーのズーム [#ib08b919]
&googlemaps2(lat=35.7643434, lng=136.933593, mapname=hng, width=400px, height=300px, mapctrl=small, typectrl=normal, zoom=6);
&googlemaps2_mark(0, 0, define=hngml, map=hng, formatlist=%title%, zoom=10, noicon=1, noinfowindow=1);
&googlemaps2_mark(0, 0, define=hngmm, map=hng, formatlist=%title%, zoom=14);
-&googlemaps2_mark(35.063725, 135.705871, class=hngml, title=本陣);
--&googlemaps2_mark(35.010328, 135.768285, class=hngmm, title=織田信長);
--&googlemaps2_mark(35.036912, 135.753969, class=hngmm, title=織田信忠);
--&googlemaps2_mark(35.013373, 135.581932, class=hngmm, title=明智光秀);
-&googlemaps2_mark(34.685169, 135.488891, class=hngml, title=南部戦線);
--&googlemaps2_mark(34.687781, 135.52597, class=hngmm, title=丹羽長秀);
--&googlemaps2_mark(34.582026, 135.468957, class=hngmm, title=徳川家康);
--&googlemaps2_mark(34.605625, 136.532507, class=hngmm, title=織田信雄);
-&googlemaps2_mark(35.603718, 135.123596, class=hngml, title=北部戦線);
--&googlemaps2_mark(35.565764, 135.147661, class=hngmm, title=細川忠興);
-&googlemaps2_mark(36.659606, 138.317871, class=hngml, title=東部戦線, zoom=10);
--&googlemaps2_mark(36.813631, 137.397122, class=hngmm, title=柴田勝家);
--&googlemaps2_mark(36.392667, 139.061208, class=hngmm, title=滝川一益);
--&googlemaps2_mark(36.565771, 138.196442, class=hngmm, title=森長可);
-&googlemaps2_mark(34.714524, 133.879394,34, class=hngml, title=西部戦線);
--&googlemaps2_mark(34.693832, 133.82206, class=hngmm, title=羽柴秀吉);

 &googlemaps2(lat=35.7643434, lng=136.933593, mapname=hng, width=400px, height=300px, mapctrl=small, typectrl=normal, zoom=6);
 &googlemaps2_mark(0, 0, define=hngml, map=hng, formatlist=%title%, zoom=10, noicon=1, noinfowindow=1);
 &googlemaps2_mark(0, 0, define=hngmm, map=hng, formatlist=%title%, zoom=14);
 -&googlemaps2_mark(35.063725, 135.705871, class=hngml, title=本陣);
 --&googlemaps2_mark(35.010328, 135.768285, class=hngmm, title=織田信長);
 --&googlemaps2_mark(35.036912, 135.753969, class=hngmm, title=織田信忠);
 --&googlemaps2_mark(35.013373, 135.581932, class=hngmm, title=明智光秀);
 -&googlemaps2_mark(34.685169, 135.488891, class=hngml, title=南部戦線);
 --&googlemaps2_mark(34.687781, 135.52597, class=hngmm, title=丹羽長秀);
 --&googlemaps2_mark(34.582026, 135.468957, class=hngmm, title=徳川家康);
 --&googlemaps2_mark(34.605625, 136.532507, class=hngmm, title=織田信雄);
 -&googlemaps2_mark(35.603718, 135.123596, class=hngml, title=北部戦線);
 --&googlemaps2_mark(35.565764, 135.147661, class=hngmm, title=細川忠興);
 -&googlemaps2_mark(36.659606, 138.317871, class=hngml, title=東部戦線, zoom=10);
 --&googlemaps2_mark(36.813631, 137.397122, class=hngmm, title=柴田勝家);
 --&googlemaps2_mark(36.392667, 139.061208, class=hngmm, title=滝川一益);
 --&googlemaps2_mark(36.565771, 138.196442, class=hngmm, title=森長可);
 -&googlemaps2_mark(34.714524, 133.879394,34, class=hngml, title=西部戦線);
 --&googlemaps2_mark(34.693832, 133.82206, class=hngmm, title=羽柴秀吉);


***オーバービューマップ [#l90e72bd]
&googlemaps2(lat=34.984326, lng=135.709562, mapname=ovtest, width=400px, type=sat, mapctrl=smallzoom, height=250px, overviewctrl=show, overviewtype=norm, overviewwidth=120, overviewheight=120);
&googlemaps2_mark(34.984326,135.709562, map=ovtest, title=桂離宮, nolist=1, alink=0);

 &googlemaps2(lat=34.984326, lng=135.709562, mapname=ovtest, width=400px, type=sat, mapctrl=smallzoom, height=250px, overviewctrl=show, overviewtype=norm, overviewwidth=120, overviewheight=120);
 &googlemaps2_mark(34.984326,135.709562, map=ovtest, title=桂離宮, nolist=1, alink=0);


***マーカーの表示の切替 [#r49aebe9]
&googlemaps2(mapname=tgtest, width=300px, height=200px, mapctrl=small, togglemarker=true, typectrl=none, zoom=6);
&googlemaps2_icon(default, define=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_udon.png, shadow=http://www.google.com/mapfiles/shadow50.png, iw=20, ih=34, sw=37, sh=34, ianchorx=10, ianchory=34, sanchorx=10, area="1 7 7 0 13 0 19 7 19 12 13 20 12 23 11 34 9 34 8 23 6 19 1 13 1 7", transparent=http://reddog.s35.xrea.com/img/googlemaps/transparent.png);
&googlemaps2_icon(うどん派, class=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_udon.png);
&googlemaps2_icon(そば派, class=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_soba.png);
&googlemaps2_icon(きしめん派, class=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_kisimen.png);

&googlemaps2_mark(0,0, define=tgmark, map=tgtest, nolist=1, noinfowindow=1);
&googlemaps2_mark(34.070862, 134.516601, class=tgmark, icon=うどん派);
&googlemaps2_mark(34.252676, 133.923339, class=tgmark, icon=うどん派);
&googlemaps2_mark(33.669496, 133.527832, class=tgmark, icon=うどん派);
&googlemaps2_mark(33.815666, 132.758789, class=tgmark, icon=うどん派);
&googlemaps2_mark(34.633207, 133.923339, class=tgmark, icon=うどん派);
&googlemaps2_mark(34.415973, 132.495117, class=tgmark, icon=うどん派);
&googlemaps2_mark(35.012002, 135.681152, class=tgmark, icon=うどん派);
&googlemaps2_mark(34.705493, 136.494140, class=tgmark, icon=うどん派);
&googlemaps2_mark(35.155845, 136.933593, class=tgmark, icon=きしめん派);
&googlemaps2_mark(35.442770, 136.735839, class=tgmark, icon=きしめん派);
&googlemaps2_mark(34.669358, 135.505371, class=tgmark, icon=うどん派);
&googlemaps2_mark(34.723554, 135.175781, class=tgmark, icon=そば派);
&googlemaps2_mark(34.687427, 135.791015, class=tgmark, icon=そば派);
&googlemaps2_mark(36.066862, 136.208496, class=tgmark, icon=そば派);
&googlemaps2_mark(36.650663, 138.180327, class=tgmark, icon=そば派);
&googlemaps2_mark(35.478564, 134.187011, class=tgmark, icon=そば派);
&googlemaps2_mark(35.012002, 138.427734, class=tgmark, icon=そば派);

 &googlemaps2(mapname=tgtest, width=300px, height=200px, mapctrl=small, togglemarker=true, typectrl=none, zoom=6);
 &googlemaps2_icon(default, define=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_udon.png, shadow=http://www.google.com/mapfiles/shadow50.png, iw=20, ih=34, sw=37, sh=34, ianchorx=10, ianchory=34, sanchorx=10, area="1 7 7 0 13 0 19 7 19 12 13 20 12 23 11 34 9 34 8 23 6 19 1 13 1 7", transparent=http://reddog.s35.xrea.com/img/googlemaps/transparent.png);
 &googlemaps2_icon(うどん派, class=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_udon.png);
 &googlemaps2_icon(そば派, class=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_soba.png);
 &googlemaps2_icon(きしめん派, class=menicon, image=http://reddog.s35.xrea.com/img/googlemaps/mm_kisimen.png);
 &googlemaps2_mark(0,0, define=tgmark, map=tgtest, nolist=1, noinfowindow=1);
 &googlemaps2_mark(34.070862, 134.516601, class=tgmark, icon=うどん派);
 &googlemaps2_mark(34.252676, 133.923339, class=tgmark, icon=うどん派);
 &googlemaps2_mark(33.669496, 133.527832, class=tgmark, icon=うどん派);
 &googlemaps2_mark(33.815666, 132.758789, class=tgmark, icon=うどん派);
 &googlemaps2_mark(34.633207, 133.923339, class=tgmark, icon=うどん派);
 &googlemaps2_mark(34.415973, 132.495117, class=tgmark, icon=うどん派);
 &googlemaps2_mark(35.012002, 135.681152, class=tgmark, icon=うどん派);
 &googlemaps2_mark(34.705493, 136.494140, class=tgmark, icon=うどん派);
 &googlemaps2_mark(35.155845, 136.933593, class=tgmark, icon=きしめん派);
 &googlemaps2_mark(35.442770, 136.735839, class=tgmark, icon=きしめん派);
 &googlemaps2_mark(34.669358, 135.505371, class=tgmark, icon=うどん派);
 &googlemaps2_mark(34.723554, 135.175781, class=tgmark, icon=そば派);
 &googlemaps2_mark(34.687427, 135.791015, class=tgmark, icon=そば派);
 &googlemaps2_mark(36.066862, 136.208496, class=tgmark, icon=そば派);
 &googlemaps2_mark(36.650663, 138.180327, class=tgmark, icon=そば派);
 &googlemaps2_mark(35.478564, 134.187011, class=tgmark, icon=そば派);
 &googlemaps2_mark(35.012002, 138.427734, class=tgmark, icon=そば派);
googlemaps2でオプションにtogglemarker=trueを指定する。

***線の描画 [#x392a1fd]
&googlemaps2(mapname=drawtest, lat=35.027773, lng=135.751157, width=400px, height=400px, scalectrl=normal, mapctrl=small, typectrl=normal, zoom=14, usetool=0);
&googlemaps2_draw(circle, map=drawtest, weight=10, lat=35.027773, lng=135.751157, color=#FF0000, opacity=0.5, radius=1.1);
&googlemaps2_draw(ngon, rotate=30, radius=1, n=3);
&googlemaps2_draw(ngon, rotate=210, radius=1, n=3);


 &googlemaps2(mapname=drawtest, lat=35.027773, lng=135.751157, width=400px, height=400px, scalectrl=normal, mapctrl=small, typectrl=normal, zoom=14, usetool=0);
 &googlemaps2_draw(circle, map=drawtest, weight=10, lat=35.027773, lng=135.751157, color=#FF0000, opacity=0.5, radius=1.1);
 &googlemaps2_draw(ngon, rotate=30, radius=1, n=3);
 &googlemaps2_draw(ngon, rotate=210, radius=1, n=3);

**コメントをどーぞ [#z86f8477]
- うーん、素晴らしい!! 作成したかった地図情報サイトが構築できそうです。早速トライしてみたいと思います。 -- [[hiyoko]] &new{2006-06-19 (月) 18:43:22};
- 凄いっすね。無ければ作ろうと思っていたけど、利用させて頂きます。 -- [[Taketan]] &new{2006-07-05 (水) 09:57:53};
- 自分のところに貼り付けると、プレビューではページがまっさらになってしまいます。 -- [[mao]] &new{2006-08-08 (火) 16:36:28};
-- まっさら状態というのかよくわからないので、そのページを直接見たいのですが。あとPukiwikiのバージョンはいくつですか。 -- [[reddog]] &new{2006-08-08 (火) 22:02:35};
- Hello, you have great site! -- [[Walter]] &new{2006-10-05 (木) 18:07:14};
- Hello, you have great site! -- [[Walter]] &new{2006-10-05 (木) 18:07:28};

#comment
----
[[PukiwikiでGoogleMaps2]] [[CategoryJavaScript]]


HTML convert time: 0.021 sec.