CFGoogleMaps
GoogleMapsAPIのPHP用クラスライブラリに続いて、Coldfusion用クラスライブラリが引っかかりました。
作者:Bryan Kaiser
CFCクラス名:CFGoogleMaps
対応バージョン:GoogleMapsAPI V1
リリース日:2005/10/27
サンプルスクリプト例は、以下のとおりです。
- CFCコンポーネント名を与えて、オブジェクト化
- GoogleMapsAPI KEYとマップセンターの緯度と経度を与えて初期化
- あとは、CFOUTPUTで呼び出すだけ
<html>
<body>
<cfscript>
//Create the object
cfgm = CreateObject('component','cfgooglemaps');
//Pass the init function your google key and the
//lat and lon on which the map should be centered
cfgm.init('INSERT GOOGLE MAP KEY',38.898748,-77.037684);
</cfscript>
<cfoutput>
<!--- Now just output the map --->
#cfgm.getMap()#
</cfoutput>
</body>
</html>
ModelGlue+GoogleMaps+AjaxCFC+αで面白いことができそう・・・
Rob Gondaのサンプルを例に、あれこれ模索してみます。
コメント