GoogleMapのスクロールを無効にしたい
sgm_bsr > GoogleMapのスクロールを無効にしたい @ 2016/8/5 2:37 |
---|
テーマは[nada icons]を利用させていただいております。 [管理画面]>[サイト基本設定]>[GoogleMaps住所]の箇所に入力した住所を固定ページに以下のように記述し表示しております。 BcBaser->googleMaps(array("width" => "100%","height" => 500)) ?> この記述で表示されているMapのスクロール機能をオフにしたく調べたところ[scrollwheel: false]を使うようなことが書かれておりましたが、どのファイルに、どのように記述すると良いかがわかりません。 /lib/Baser/View/Elements/の中に[google_maps.php]と[googlemaps.php]があるのですが、正しい記述がわからずに止まっております。 もし分かるがいらっしゃるようならご教示頂けますと幸いです。 [google_maps.php]には以下のようなコードがかかれております。 /** * [PUBLISH] グールグルマップ * * baserCMS : Based Website Development Project <http://basercms.net> * Copyright 2008 - 2014, baserCMS Users Community <http://sites.google.com/site/baserusers/> * * @copyright Copyright 2008 - 2014, baserCMS Users Community * @link http://basercms.net baserCMS Project * @package Baser.View * @since baserCMS v 0.1.0 * @license http://basercms.net/license/index.html * @deprecated since version 3.0.3 */ trigger_error(deprecatedMessage('テンプレート:googlemaps.php', '3.0.3', '3.1.0', '$this->BcBaser->googleMaps() を利用してください。'), E_USER_DEPRECATED); $_width = 600; $_height = 400; $_zoom = 16; $_mapId = 'map'; $_scrollwheel = false; $_address = $this->BcBaser->siteConfig['address']; $_markerText = '' . $this->BcBaser->siteConfig['name'] . ' ' . $_address . ''; if (isset($width)) { $_width = $width; } if (isset($height)) { $_height = $height; } if (isset($zoom)) { $_zoom = $zoom; } if (isset($mapId)) { $_mapId = $mapId; } if (isset($address)) { $_address = $address; } if (isset($markerText)) { $_markerText = $markerText; } if (isset($longitude)) { $this->BcGooglemaps->longitude = $longitude; } if (isset($latitude)) { $this->BcGooglemaps->latitude = $latitude; } $this->BcGooglemaps->mapId = $_mapId; $this->BcGooglemaps->zoom = $_zoom; $this->BcGooglemaps->title = $this->BcBaser->siteConfig['name']; $this->BcGooglemaps->markerText = $_markerText; if (!$this->BcGooglemaps->load($_address, $_width, $_height)) { echo 'Google Maps を読み込めません。管理画面で正しい住所が設定されているか確認してください。'; } 以上になります。 よろしくお願いいたします。 ■ BaserCMSのバージョン:3.0.10 ■ レンタルサーバー名:ロリポップ(スタンダード) ■ スマートURLの利用:ON ■ 設置フォルダ:ドキュメントルート ■ 利用しているデータベース:MySQL ■ PHPスキル(自己評価):D |
goichi > Re: GoogleMapのスクロールを無効にしたい @ 2016/8/5 18:41 |
---|
baserCMSの関数で出力すると、ご希望の状態をつくるのに手間がかかるので、一般的なGoogleMapの埋め込みをすると良いと思います。オプションでscrollwheelをfalseにすればOKです。
|
sgm_bsr > Re: GoogleMapのスクロールを無効にしたい @ 2016/8/6 12:43 |
---|
ご回答頂きありがとうございました。
やはり手間はかかるのですね。助言頂いたとおり関数で出力するのはやめて、普通の埋め込みでやってみたいと思います。 |