Google MapsTMで遊んでみよう!

最終更新日 2007/11/10

【データベースに従って地図上に情報を表示する】
   今度はPanoramioにアップロードされている私の撮影した写真 に関する情報(タイトル、写真のID、緯度、経度)に従って地図上にアイコンを配置し 、クリックした場合に情報を表示してみます。
ブラウザで「ソースの表示」を行うとこの見本のJAVAScriptを読むことができます。
 
 
 
【説明】
 最初にPanoramioのデータベースから吸い上げたこの地域で私が撮影した写真のデータがphotodataとして定義されています。
それ以外は2行くらいしか先ほどの例との差異はありません。

 //<![CDATA[
function load() {
if (GBrowserIsCompatible()) {

var photodata = {
"count": 70,
"photos": [
{"photo_id": 1904737, "photo_title": "Fushimi Inari Shrine", "photo_url": "http://www.panoramio.com/photo/1904737", "photo_file_url": "http://static2.bareka.com/photos/medium/1904737.jpg", "longitude": 135.778484, "latitude": 34.968476, "width": 500, "height": 375, "upload_date": "24 April 2007", "owner_id": 99693, "owner_name": "kuroten06", "owner_url": "http://www.panoramio.com/user/99693"},
{"photo_id": 1815270, "photo_title": "Jounangu Shrine (城南宮) 2GB突破記念", "photo_url": "http://www.panoramio.com/photo/1815270", "photo_file_url": "http://static3.bareka.com/photos/medium/1815270.jpg", "longitude": 135.747459, "latitude": 34.950189, "width": 500, "height": 375, "upload_date": "17 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788125, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788125", "photo_file_url": "http://static2.bareka.com/photos/medium/1788125.jpg", "longitude": 135.745536, "latitude": 34.950631, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788122, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788122", "photo_file_url": "http://static3.bareka.com/photos/medium/1788122.jpg", "longitude": 135.747052, "latitude": 34.950360, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788120, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788120", "photo_file_url": "http://static1.bareka.com/photos/medium/1788120.jpg", "longitude": 135.747593, "latitude": 34.950365, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788115, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788115", "photo_file_url": "http://static4.bareka.com/photos/medium/1788115.jpg", "longitude": 135.747832, "latitude": 34.950224, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788111, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788111", "photo_file_url": "http://static4.bareka.com/photos/medium/1788111.jpg", "longitude": 135.747797, "latitude": 34.950024, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788106, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788106", "photo_file_url": "http://static3.bareka.com/photos/medium/1788106.jpg", "longitude": 135.747736, "latitude": 34.949998, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788068, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788068", "photo_file_url": "http://static1.bareka.com/photos/medium/1788068.jpg", "longitude": 135.746888, "latitude": 34.949918, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788059, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788059", "photo_file_url": "http://static4.bareka.com/photos/medium/1788059.jpg", "longitude": 135.746942, "latitude": 34.949962, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1788053, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1788053", "photo_file_url": "http://static2.bareka.com/photos/medium/1788053.jpg", "longitude": 135.746856, "latitude": 34.949958, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1787939, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1787939", "photo_file_url": "http://static4.bareka.com/photos/medium/1787939.jpg", "longitude": 135.747078, "latitude": 34.950024, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1787934, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1787934", "photo_file_url": "http://static3.bareka.com/photos/medium/1787934.jpg", "longitude": 135.747124, "latitude": 34.949956, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1787926, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1787926", "photo_file_url": "http://static3.bareka.com/photos/medium/1787926.jpg", "longitude": 135.747269, "latitude": 34.950099, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1787917, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1787917", "photo_file_url": "http://static2.bareka.com/photos/medium/1787917.jpg", "longitude": 135.747330, "latitude": 34.950134, "width": 375, "height": 500, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1787912, "photo_title": "Jonangu Shrine (城南宮)", "photo_url": "http://www.panoramio.com/photo/1787912", "photo_file_url": "http://static1.bareka.com/photos/medium/1787912.jpg", "longitude": 135.747296, "latitude": 34.950202, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1782643, "photo_title": "瓦", "photo_url": "http://www.panoramio.com/photo/1782643", "photo_file_url": "http://static4.bareka.com/photos/medium/1782643.jpg", "longitude": 135.773506, "latitude": 34.977443, "width": 500, "height": 375, "upload_date": "15 April 2007", "owner_id": 376655, "owner_name": "konayano", "owner_url": "http://www.panoramio.com/user/376655"},
{"photo_id": 1782518, "photo_title": "東福寺Tofukuji", "photo_url": "http://www.panoramio.com/photo/1782518", "photo_file_url": "http://static3.bareka.com/photos/medium/1782518.jpg", "longitude": 135.773506, "latitude": 34.976845, "width": 500, "height": 333, "upload_date": "15 April 2007", "owner_id": 376655, "owner_name": "konayano", "owner_url": "http://www.panoramio.com/user/376655"},
{"photo_id": 1773340, "photo_title": "Fushimi-Momoyama-jo Castle (伏見桃山城の正門)", "photo_url": "http://www.panoramio.com/photo/1773340", "photo_file_url": "http://static1.bareka.com/photos/medium/1773340.jpg", "longitude": 135.776462, "latitude": 34.938323, "width": 500, "height": 393, "upload_date": "14 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1773332, "photo_title": "Fushimi-Momoyama-jo Castle (伏見桃山城の正門)", "photo_url": "http://www.panoramio.com/photo/1773332", "photo_file_url": "http://static1.bareka.com/photos/medium/1773332.jpg", "longitude": 135.776776, "latitude": 34.938299, "width": 500, "height": 375, "upload_date": "14 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1771410, "photo_title": "On sightseeing boat through the old canal (十石船ツアー)", "photo_url": "http://www.panoramio.com/photo/1771410", "photo_file_url": "http://static3.bareka.com/photos/medium/1771410.jpg", "longitude": 135.756147, "latitude": 34.924830, "width": 500, "height": 375, "upload_date": "14 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1651614, "photo_title": "Viewing from Mausoleum of Meiji Emperor (明治天皇稜にある230段の階段の上からの眺望)", "photo_url": "http://www.panoramio.com/photo/1651614", "photo_file_url": "http://static3.bareka.com/photos/medium/1651614.jpg", "longitude": 135.781392, "latitude": 34.935350, "width": 500, "height": 375, "upload_date": "06 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1651558, "photo_title": "Momoyamajo Castle (伏見桃山城)", "photo_url": "http://www.panoramio.com/photo/1651558", "photo_file_url": "http://static3.bareka.com/photos/medium/1651558.jpg", "longitude": 135.775845, "latitude": 34.938578, "width": 500, "height": 375, "upload_date": "06 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1651324, "photo_title": "A moat remain of Momoyamajo Castle (伏見桃山城の堀の跡)", "photo_url": "http://www.panoramio.com/photo/1651324", "photo_file_url": "http://static1.bareka.com/photos/medium/1651324.jpg", "longitude": 135.774995, "latitude": 34.937813, "width": 500, "height": 375, "upload_date": "06 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1651321, "photo_title": "Way to Mausoleum of Kanmu Emperor (桓武天皇稜と明治天皇稜をつなぐ路)", "photo_url": "http://www.panoramio.com/photo/1651321", "photo_file_url": "http://static2.bareka.com/photos/medium/1651321.jpg", "longitude": 135.775180, "latitude": 34.935530, "width": 500, "height": 375, "upload_date": "06 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1651315, "photo_title": "Way from Mausoleum of Meiji Emperor", "photo_url": "http://www.panoramio.com/photo/1651315", "photo_file_url": "http://static4.bareka.com/photos/medium/1651315.jpg", "longitude": 135.775641, "latitude": 34.935168, "width": 375, "height": 500, "upload_date": "06 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1623870, "photo_title": "Myoan-ji - altar statue of Kakushin", "photo_url": "http://www.panoramio.com/photo/1623870", "photo_file_url": "http://static3.bareka.com/photos/medium/1623870.jpg", "longitude": 135.773097, "latitude": 34.978833, "width": 411, "height": 500, "upload_date": "04 April 2007", "owner_id": 322867, "owner_name": "Elliot Kallen", "owner_url": "http://www.panoramio.com/user/322867"},
{"photo_id": 1623834, "photo_title": "Myoan-ji entrance gate", "photo_url": "http://www.panoramio.com/photo/1623834", "photo_file_url": "http://static3.bareka.com/photos/medium/1623834.jpg", "longitude": 135.772822, "latitude": 34.978683, "width": 500, "height": 371, "upload_date": "04 April 2007", "owner_id": 322867, "owner_name": "Elliot Kallen", "owner_url": "http://www.panoramio.com/user/322867"},
{"photo_id": 1607798, "photo_title": "Tofukuji- temple", "photo_url": "http://www.panoramio.com/photo/1607798", "photo_file_url": "http://static3.bareka.com/photos/medium/1607798.jpg", "longitude": 135.773968, "latitude": 34.977206, "width": 500, "height": 375, "upload_date": "03 April 2007", "owner_id": 99693, "owner_name": "kuroten06", "owner_url": "http://www.panoramio.com/user/99693"},
{"photo_id": 1599307, "photo_title": "Momoyama Castle (伏見桃山城)", "photo_url": "http://www.panoramio.com/photo/1599307", "photo_file_url": "http://static4.bareka.com/photos/medium/1599307.jpg", "longitude": 135.776607, "latitude": 34.938121, "width": 500, "height": 375, "upload_date": "02 April 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1567594, "photo_title": "Fushimi Inari Shrine", "photo_url": "http://www.panoramio.com/photo/1567594", "photo_file_url": "http://static3.bareka.com/photos/medium/1567594.jpg", "longitude": 135.776580, "latitude": 34.969927, "width": 500, "height": 375, "upload_date": "31 March 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1567589, "photo_title": "Fushimi Inari Shrine", "photo_url": "http://www.panoramio.com/photo/1567589", "photo_file_url": "http://static2.bareka.com/photos/medium/1567589.jpg", "longitude": 135.777615, "latitude": 34.970164, "width": 375, "height": 500, "upload_date": "31 March 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1567583, "photo_title": "Fushimi Inari Shrine", "photo_url": "http://www.panoramio.com/photo/1567583", "photo_file_url": "http://static4.bareka.com/photos/medium/1567583.jpg", "longitude": 135.778774, "latitude": 34.970133, "width": 500, "height": 375, "upload_date": "31 March 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1567555, "photo_title": "Fushimi Inari Shrine", "photo_url": "http://www.panoramio.com/photo/1567555", "photo_file_url": "http://static4.bareka.com/photos/medium/1567555.jpg", "longitude": 135.783613, "latitude": 34.969489, "width": 500, "height": 375, "upload_date": "31 March 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1018494, "photo_title": "Fujinomori Shrine Festival", "photo_url": "http://www.panoramio.com/photo/1018494", "photo_file_url": "http://static3.bareka.com/photos/medium/1018494.jpg", "longitude": 135.764548, "latitude": 34.945561, "width": 500, "height": 375, "upload_date": "25 February 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 1017512, "photo_title": "Fushimi Inari Shrine", "photo_url": "http://www.panoramio.com/photo/1017512", "photo_file_url": "http://static1.bareka.com/photos/medium/1017512.jpg", "longitude": 135.775566, "latitude": 34.965874, "width": 500, "height": 375, "upload_date": "25 February 2007", "owner_id": 212860, "owner_name": "natcho", "owner_url": "http://www.panoramio.com/user/212860"},
{"photo_id": 789882, "photo_title": "昭憲皇太后陵", "photo_url": "http://www.panoramio.com/photo/789882", "photo_file_url": "http://static3.bareka.com/photos/medium/789882.jpg", "longitude": 135.783355, "latitude": 34.935640, "width": 500, "height": 375, "upload_date": "12 February 2007", "owner_id": 166857, "owner_name": "ryo.H", "owner_url": "http://www.panoramio.com/user/166857"},
{"photo_id": 789876, "photo_title": "明治天皇陵", "photo_url": "http://www.panoramio.com/photo/789876", "photo_file_url": "http://static1.bareka.com/photos/medium/789876.jpg", "longitude": 135.781338, "latitude": 34.935588, "width": 500, "height": 375, "upload_date": "12 February 2007", "owner_id": 166857, "owner_name": "ryo.H", "owner_url": "http://www.panoramio.com/user/166857"},
{"photo_id": 789871, "photo_title": "桓武天皇陵", "photo_url": "http://www.panoramio.com/photo/789871", "photo_file_url": "http://static4.bareka.com/photos/medium/789871.jpg", "longitude": 135.774858, "latitude": 34.939501, "width": 500, "height": 375, "upload_date": "12 February 2007", "owner_id": 166857, "owner_name": "ryo.H", "owner_url": "http://www.panoramio.com/user/166857"},
{"photo_id": 789718, "photo_title": "東寺-金堂", "photo_url": "http://www.panoramio.com/photo/789718", "photo_file_url": "http://static3.bareka.com/photos/medium/789718.jpg", "longitude": 135.747714, "latitude": 34.980379, "width": 500, "height": 375, "upload_date": "12 February 2007", "owner_id": 166857, "owner_name": "ryo.H", "owner_url": "http://www.panoramio.com/user/166857"},
{"photo_id": 640719, "photo_title": "Tofukuji in Kyoto(京都の東福寺)", "photo_url": "http://www.panoramio.com/photo/640719", "photo_file_url": "http://static4.bareka.com/photos/medium/640719.jpg", "longitude": 135.773849, "latitude": 34.977373, "width": 500, "height": 375, "upload_date": "01 February 2007", "owner_id": 57708, "owner_name": "Masahiko Nagao", "owner_url": "http://www.panoramio.com/user/57708"},
{"photo_id": 640703, "photo_title": "Tofukuji in Kyoto(京都の東福寺)", "photo_url": "http://www.panoramio.com/photo/640703", "photo_file_url": "http://static4.bareka.com/photos/medium/640703.jpg", "longitude": 135.774558, "latitude": 34.977531, "width": 500, "height": 375, "upload_date": "01 February 2007", "owner_id": 57708, "owner_name": "Masahiko Nagao", "owner_url": "http://www.panoramio.com/user/57708"},
{"photo_id": 640692, "photo_title": "Tofukuji in Kyoto(京都の東福寺)", "photo_url": "http://www.panoramio.com/photo/640692", "photo_file_url": "http://static1.bareka.com/photos/medium/640692.jpg", "longitude": 135.774021, "latitude": 34.976705, "width": 500, "height": 375, "upload_date": "01 February 2007", "owner_id": 57708, "owner_name": "Masahiko Nagao", "owner_url": "http://www.panoramio.com/user/57708"},
{"photo_id": 486189, "photo_title": "Fujinomori Shrine Festival in May", "photo_url": "http://www.panoramio.com/photo/486189", "photo_file_url": "http://static2.bareka.com/photos/medium/486189.jpg", "longitude": 135.771784, "latitude": 34.950862, "width": 500, "height": 375, "upload_date": "19 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 452650, "photo_title": "Minor Cherry Blossom-Viewing Spot (京都伏見郵便局本局前R24)", "photo_url": "http://www.panoramio.com/photo/452650", "photo_file_url": "http://static3.bareka.com/photos/medium/452650.jpg", "longitude": 135.763335, "latitude": 34.945675, "width": 500, "height": 375, "upload_date": "16 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 452646, "photo_title": "Old-Time Canal Lock in Kyoto (京都疎水水力発電所跡)", "photo_url": "http://www.panoramio.com/photo/452646", "photo_file_url": "http://static3.bareka.com/photos/medium/452646.jpg", "longitude": 135.767069, "latitude": 34.945913, "width": 500, "height": 375, "upload_date": "16 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 452637, "photo_title": "Old-Time Canal Lock in Kyoto (京都疎水)", "photo_url": "http://www.panoramio.com/photo/452637", "photo_file_url": "http://static2.bareka.com/photos/medium/452637.jpg", "longitude": 135.767573, "latitude": 34.945948, "width": 500, "height": 375, "upload_date": "16 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 407776, "photo_title": "Wine cellar in Fusimi(伏見の酒蔵、京都)", "photo_url": "http://www.panoramio.com/photo/407776", "photo_file_url": "http://static1.bareka.com/photos/medium/407776.jpg", "longitude": 135.761071, "latitude": 34.929395, "width": 500, "height": 375, "upload_date": "13 January 2007", "owner_id": 57708, "owner_name": "Masahiko Nagao", "owner_url": "http://www.panoramio.com/user/57708"},
{"photo_id": 407673, "photo_title": "Teradaya in Fushimi(伏見の寺田屋、京都)", "photo_url": "http://www.panoramio.com/photo/407673", "photo_file_url": "http://static2.bareka.com/photos/medium/407673.jpg", "longitude": 135.759602, "latitude": 34.930134, "width": 500, "height": 375, "upload_date": "13 January 2007", "owner_id": 57708, "owner_name": "Masahiko Nagao", "owner_url": "http://www.panoramio.com/user/57708"},
{"photo_id": 382376, "photo_title": "Toji temple, Kyoto", "photo_url": "http://www.panoramio.com/photo/382376", "photo_file_url": "http://static1.bareka.com/photos/medium/382376.jpg", "longitude": 135.748816, "latitude": 34.979797, "width": 333, "height": 500, "upload_date": "11 January 2007", "owner_id": 81779, "owner_name": "Fabrizio Ricci", "owner_url": "http://www.panoramio.com/user/81779"},
{"photo_id": 380119, "photo_title": "Fushimi Inari Shrine (Taisha) top", "photo_url": "http://www.panoramio.com/photo/380119", "photo_file_url": "http://static4.bareka.com/photos/medium/380119.jpg", "longitude": 135.785512, "latitude": 34.967016, "width": 333, "height": 500, "upload_date": "11 January 2007", "owner_id": 81059, "owner_name": "Andreas Maaninka", "owner_url": "http://www.panoramio.com/user/81059"},
{"photo_id": 380098, "photo_title": "Fushimi Inari Shrine (Taisha)", "photo_url": "http://www.panoramio.com/photo/380098", "photo_file_url": "http://static3.bareka.com/photos/medium/380098.jpg", "longitude": 135.775115, "latitude": 34.967258, "width": 500, "height": 334, "upload_date": "11 January 2007", "owner_id": 81059, "owner_name": "Andreas Maaninka", "owner_url": "http://www.panoramio.com/user/81059"},
{"photo_id": 380071, "photo_title": "Fushimi Inari Shrine (Taisha)", "photo_url": "http://www.panoramio.com/photo/380071", "photo_file_url": "http://static4.bareka.com/photos/medium/380071.jpg", "longitude": 135.774563, "latitude": 34.967052, "width": 500, "height": 334, "upload_date": "11 January 2007", "owner_id": 81059, "owner_name": "Andreas Maaninka", "owner_url": "http://www.panoramio.com/user/81059"},
{"photo_id": 352836, "photo_title": "japan 1 134", "photo_url": "http://www.panoramio.com/photo/352836", "photo_file_url": "http://static1.bareka.com/photos/medium/352836.jpg", "longitude": 135.772524, "latitude": 34.967162, "width": 500, "height": 375, "upload_date": "09 January 2007", "owner_id": 75024, "owner_name": "Mochi Mochi kun", "owner_url": "http://www.panoramio.com/user/75024"},
{"photo_id": 332542, "photo_title": "View from Kyoto Tower looking South", "photo_url": "http://www.panoramio.com/photo/332542", "photo_file_url": "http://static3.bareka.com/photos/medium/332542.jpg", "longitude": 135.757627, "latitude": 34.980221, "width": 500, "height": 372, "upload_date": "07 January 2007", "owner_id": 62231, "owner_name": "sandmonkee", "owner_url": "http://www.panoramio.com/user/62231"},
{"photo_id": 302229, "photo_title": "Tofuku-ji complex", "photo_url": "http://www.panoramio.com/photo/302229", "photo_file_url": "http://static2.bareka.com/photos/medium/302229.jpg", "longitude": 135.773731, "latitude": 34.977698, "width": 500, "height": 366, "upload_date": "05 January 2007", "owner_id": 64946, "owner_name": "CiccioNutella", "owner_url": "http://www.panoramio.com/user/64946"},
{"photo_id": 301661, "photo_title": "Komyo-in subtemple", "photo_url": "http://www.panoramio.com/photo/301661", "photo_file_url": "http://static2.bareka.com/photos/medium/301661.jpg", "longitude": 135.773715, "latitude": 34.974010, "width": 500, "height": 367, "upload_date": "04 January 2007", "owner_id": 64946, "owner_name": "CiccioNutella", "owner_url": "http://www.panoramio.com/user/64946"},
{"photo_id": 301470, "photo_title": "Kaisando", "photo_url": "http://www.panoramio.com/photo/301470", "photo_file_url": "http://static3.bareka.com/photos/medium/301470.jpg", "longitude": 135.773892, "latitude": 34.977892, "width": 500, "height": 367, "upload_date": "04 January 2007", "owner_id": 64946, "owner_name": "CiccioNutella", "owner_url": "http://www.panoramio.com/user/64946"},
{"photo_id": 289502, "photo_title": "Tool for making Japanese Sake (月桂冠 大倉記念館)", "photo_url": "http://www.panoramio.com/photo/289502", "photo_file_url": "http://static3.bareka.com/photos/medium/289502.jpg", "longitude": 135.761645, "latitude": 34.928828, "width": 500, "height": 375, "upload_date": "03 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 289491, "photo_title": "Tool for making Japanese Sake  (月桂冠 大倉記念館)", "photo_url": "http://www.panoramio.com/photo/289491", "photo_file_url": "http://static4.bareka.com/photos/medium/289491.jpg", "longitude": 135.761586, "latitude": 34.928795, "width": 375, "height": 500, "upload_date": "03 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 289470, "photo_title": "Ohkura Kinenkan (formal banquet)  (月桂冠 大倉記念館)", "photo_url": "http://www.panoramio.com/photo/289470", "photo_file_url": "http://static3.bareka.com/photos/medium/289470.jpg", "longitude": 135.761683, "latitude": 34.928736, "width": 500, "height": 375, "upload_date": "03 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 289464, "photo_title": "Ohkura Kinenkan (月桂冠 大倉記念館)", "photo_url": "http://www.panoramio.com/photo/289464", "photo_file_url": "http://static1.bareka.com/photos/medium/289464.jpg", "longitude": 135.761608, "latitude": 34.928753, "width": 375, "height": 500, "upload_date": "03 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 289432, "photo_title": "Old Type Japanese Bathtub at Teradaya (寺田屋 女主人のお龍が入浴中に外の異変に気づき、竜馬に急を知らせたとされる。)", "photo_url": "http://www.panoramio.com/photo/289432", "photo_file_url": "http://static1.bareka.com/photos/medium/289432.jpg", "longitude": 135.759591, "latitude": 34.930358, "width": 375, "height": 500, "upload_date": "03 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 283497, "photo_title": "On sightseeing boat through the old canal (十石船ツアー 月桂冠大倉記念館)", "photo_url": "http://www.panoramio.com/photo/283497", "photo_file_url": "http://static2.bareka.com/photos/medium/283497.jpg", "longitude": 135.761230, "latitude": 34.929248, "width": 500, "height": 375, "upload_date": "02 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 283492, "photo_title": "On sightseeing boat through the old canal (十石船ツアー 月桂冠大倉記念館)", "photo_url": "http://www.panoramio.com/photo/283492", "photo_file_url": "http://static1.bareka.com/photos/medium/283492.jpg", "longitude": 135.761211, "latitude": 34.929303, "width": 500, "height": 375, "upload_date": "02 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 283489, "photo_title": "Garden of Tradaya (伏見中書島の寺田屋旅館の庭)", "photo_url": "http://www.panoramio.com/photo/283489", "photo_file_url": "http://static2.bareka.com/photos/medium/283489.jpg", "longitude": 135.759532, "latitude": 34.930380, "width": 500, "height": 375, "upload_date": "02 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 283473, "photo_title": "Ohkura Memorial Hall for Gekkeikan Sake Factory (月桂冠 大倉記念館)", "photo_url": "http://www.panoramio.com/photo/283473", "photo_file_url": "http://static2.bareka.com/photos/medium/283473.jpg", "longitude": 135.761653, "latitude": 34.928934, "width": 500, "height": 375, "upload_date": "02 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 283454, "photo_title": "Ohkura Memorial Hall for Gekkeikan Sake Factory (月桂冠 大倉記念館)", "photo_url": "http://www.panoramio.com/photo/283454", "photo_file_url": "http://static3.bareka.com/photos/medium/283454.jpg", "longitude": 135.761651, "latitude": 34.928727, "width": 500, "height": 375, "upload_date": "02 January 2007", "owner_id": 59925, "owner_name": "Tomoaki Ueda", "owner_url": "http://www.panoramio.com/user/59925"},
{"photo_id": 231657, "photo_title": "DSC01434", "photo_url": "http://www.panoramio.com/photo/231657", "photo_file_url": "http://static2.bareka.com/photos/medium/231657.jpg", "longitude": 135.782089, "latitude": 34.974032, "width": 500, "height": 375, "upload_date": "25 December 2006", "owner_id": 47302, "owner_name": "M.Yagi", "owner_url": "http://www.panoramio.com/user/47302"},
{"photo_id": 48504, "photo_title": "Fushimiinari shrine 伏見稲荷", "photo_url": "http://www.panoramio.com/photo/48504", "photo_file_url": "http://static1.bareka.com/photos/medium/48504.jpg", "longitude": 135.775502, "latitude": 34.966621, "width": 333, "height": 500, "upload_date": "15 September 2006", "owner_id": 7181, "owner_name": "Kaiseikun", "owner_url": "http://www.panoramio.com/user/7181"}
]
}


   var map = new GMap2(document.getElementById("map"));
   map.addControl(new GLargeMapControl());
   map.addControl(new GMapTypeControl());
   map.addControl(new GScaleControl());
   map.setCenter(new GLatLng(34.94097,135.765953), 13);
   map.setMapType(G_HYBRID_MAP);
   var icon = new GIcon();
   icon.image = "http://www.neo-tech-lab.co.uk/GoogleMaps.files/panoramio-marker.png";
   icon.shadow = "http://www.neo-tech-lab.co.uk/GoogleMaps.files/panoramio-shadow.png";
   icon.iconSize = new GSize(18, 20);
   icon.shadowSize = new GSize(22, 20);
   icon.iconAnchor = new GPoint(6, 20);
   icon.infoWindowAnchor = new GPoint(5, 1);
   function createMarker(point, number) {
     var marker = new GMarker(point, icon);
     GEvent.addListener(marker, "click", function() {
       marker.openInfoWindowHtml(photodata.photos[number].photo_title+"<br>"
       +photodata.photos[number].photo_id+"<br>"+photodata.photos[number].longitude+"<br>"+photodata.photos[number].latitude);
     });
     return marker;
   }
   var bounds = map.getBounds();
   var southWest = bounds.getSouthWest();
   var northEast = bounds.getNorthEast();
   var lngSpan = northEast.lng() - southWest.lng();
   var latSpan = northEast.lat() - southWest.lat();
   for (var i = 0; i < 25; i++) {
     var point = new GLatLng( photodata.photos[i].latitude, photodata.photos[i].longitude );
     map.addOverlay(createMarker(point, i+1));
   }
  }
 }
//]]>
 



 

マウスで地図上をクリックするとGoogle地図上の座標を抽出することができます。
ブラウザで「ソースの表示」を行うとJAVAScriptを読むことができます。