[Hiki-dev] 地図プラグイン

Back to archive index

増井俊之 masui****@pitec*****
2003年 8月 22日 (金) 19:11:31 JST


増井と申します。Web地図プラグインというのを作ってみました。

def webmap(latitude,longitude)
  '[' + [
    make_anchor("http://map.yahoo.co.jp/pl?nl=#{latitude}&el=#{longitude}&la=1", 'Yahoo'),
    make_anchor("http://www.mapfan.com/link.cgi?MAP=E#{longitude}N#{latitude}&ZM=10", 'MapFan'),
  ].join('/') + ']'
end

webmap('35.41.42.928','139.46.34.434')
みたいに北緯/東経を指定すると地図へのリンクになります。

増井 俊之
独立行政法人 産業技術総合研究所 情報処理研究部門
〒113-6591 文京区本駒込2-28-8 文京グリーンコート センターオフィス 18F
Phone: 090-6165-9620  Fax: 03-5976-0689
E-mail: masui****@pitec*****   http://pitecan.com/





Hiki-dev メーリングリストの案内
Back to archive index