FYI:Static Maps API で、あなたのマップのスナップショットを作る「SnapshotControl 1.0」

23 views
Skip to first unread message

Masashi Katsumata

unread,
Sep 20, 2009, 11:21:44 AM9/20/09
to google-map...@googlegroups.com
こんにちは。Google Maps API Expert の Masashi.Kです。
私が作ったライブラリがgmaps-uility-library でリリースされて
Google Geo Developers Blog で紹介していただいたので、概要だけご紹介します。

いつもの通り、かなりの意訳・追加(そしてきっと誤訳)しているので、
原文を読みたい方はこちらへどうぞ。

■SnapshotControl 1.0: Using the Static Maps API to Snapshot Your Maps
http://googlegeodevelopers.blogspot.com/2009/09/snapshotcontrol-10-using-static-maps.html

---------------------------------------------------------

今回、「SnapShotControl」というライブラリを作成しました。
このコントロールは、あなたのGoogle マップのスナップショット画像を、最近リリースされたGoogle Static Maps API
v2 を使って作成します。

デフォルトの動作は、地図上にシャッターボタンを作成し、ボタンを押すとスナップショットをポップアップで表示します。
ですが、コントロールは非表示にすることができ、プログラム的にスナップショットのURLを作成して、それを取得することも出来ます。
つまりライブラリを柔軟に扱うことが出来ます。

-----------------------

SnapShotControl の使い方は

  map.addControl(new SnapShotConotrol());

とするだけです。

使ってみたい方は、こちらからリファレンスとデモを見ていただくことが出来ます。
ぜひ使ってみてください。

SnapShotControl
http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/

リファレンス:
http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/docs/reference.html

デモ
http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/examples/markerAutoDetect.html

不具合・機能要望:
http://code.google.com/p/gmaps-utility-library-dev/issues/list


-----------------------
(追記)

ライブラリはマーカーやポリライン、ポリゴンを自動で判定します。
ただし、その色やサイズを知るための方法が、Maps API では提供されていなかったので
色を再現したい場合には、若干のパラメータを指定する必要があります。

それらは以下のデモを参考にしてください。

Marker Styles
http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/examples/markerStyles.html

Poly Styles
http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/examples/polyStyles.html

Options Wizard
http://gmaps-utility-library-dev.googlecode.com/svn/tags/snapshotcontrol/1.0/examples/optionsWizard.html

screenshot_snapshotcontrol.png
Reply all
Reply to author
Forward
0 new messages