「ver4/関数リファレンス/getGoogleMaps」の版間の差分
提供: baserCMS公式ガイド
行4: | 行4: | ||
Google Maps を取得する。<br> | Google Maps を取得する。<br> | ||
'''管理画面 > システム設定 > サイト基本設定 > オプション > GoogleMaps住所 APIキー''' <br> | '''管理画面 > システム設定 > サイト基本設定 > オプション > GoogleMaps住所 APIキー''' <br> | ||
− | + | へ、Google Maps APIキーの登録が必要です。 | |
行30: | 行30: | ||
: - `longitude`:表示位置の経度を指定(初期値 : null) | : - `longitude`:表示位置の経度を指定(初期値 : null) | ||
: - `latitude`:表示位置の緯度を指定(初期値 : null) | : - `latitude`:表示位置の緯度を指定(初期値 : null) | ||
− | |||
− | |||
## 戻り値 | ## 戻り値 | ||
(string) | (string) | ||
− | Google Maps | + | : Google Maps |
行55: | 行53: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
## 類似の関数 | ## 類似の関数 | ||
- [googleMaps](/ver4/関数リファレンス/googleMaps) - Google Maps を出力する | - [googleMaps](/ver4/関数リファレンス/googleMaps) - Google Maps を出力する | ||
− | |||
− |
2018年12月21日 (金) 02:16時点における最新版
[このコンテンツは内容調整中です]
説明
Google Maps を取得する。
管理画面 > システム設定 > サイト基本設定 > オプション > GoogleMaps住所 APIキー
へ、Google Maps APIキーの登録が必要です。
使い方
<?php $this->BcBaser->getGoogleMaps([$data] , [$options] ); ?>
パラメータ
- (array) $data
- 読み込むテンプレートに引き継ぐパラメータ
- - 初期値 : array()
- (string) $option
- オプション
- - 初期値 : array()
- -
width
:表示するマップの幅をピクセル単位で指定(初期値 : '600') - -
height
:表示するマップの高さをピクセル単位指定(初期値 : '400') - -
zoom
:表示するマップのズームレベル(0:広域~21:詳細)を指定(初期値 : '16') - -
mapId
:表示するマップのIDを指定(初期値 : 'map') - -
address
:表示位置の住所を指定(初期値 : システム管理画面で設定した住所) - -
markerText
:マーカーテキストを指定(初期値 : null) - -
longitude
:表示位置の経度を指定(初期値 : null) - -
latitude
:表示位置の緯度を指定(初期値 : null)
戻り値
- (string)
- Google Maps
用例
基本
Google Mapを取得し、echoで出力する。
コード
<?php echo $this->BcBaser->getGoogleMaps(); ?>
応用
Google Mapを取得し、幅800px、高さ600px、ズームレベル18を指定し、echoで出力する。
コード
<?php echo $this->BcBaser->getGoogleMaps(array('width'=>'800', 'height'=>'600', 'zoom'=>'18')); ?>
類似の関数
- googleMaps - Google Maps を出力する