Skip to content

fix #4462 カスタムコンテンツにGoogleMapブロックがほしい問題を解決 - #4576

Merged
ryuring merged 1 commit into
baserproject:5.4.xfrom
katokaisya:dev-#4462
Oct 27, 2026
Merged

ryuring merged 1 commit into
baserproject:5.4.xfrom
katokaisya:dev-#4462

Conversation

@katokaisya

Copy link
Copy Markdown
Collaborator

カスタムコンテンツにGoogleマップフィールドを追加

機能

  • カスタムコンテンツに「Googleマップ」フィールド(BcCcGoogleMap)を追加
  • 座標、座標入りの地図URL、「地図を埋め込む」の HTML を入力可能(座標が取れない値は保存時にエラー)
  • APIキーがある場合は、入力欄に「住所から検索」を表示
  • 保存済みのエントリーでは、入力欄の下にミニマップを表示(APIキーの有無にかかわらず表示)
  • フロントは既定で埋め込み地図を出力(format で link / latlng / URL に切り替え可能)
  • 管理画面の一覧には「緯度,経度」を表示

注意点

  • get() は escape => false に固定し、strip_tags() で と <iframe> だけを残して返す(タグは Html ヘルパーで生成)
  • 出力するURLは http(s) と Google の埋め込みURLに限定
  • 管理画面では、一覧側の h() に合わせて座標の文字列を返す(BcUtil::isAdminSystem() で判定)
  • 「住所から検索」を使うには、APIキーで Maps JavaScript API と Geocoding API を有効にしておく必要がある

@github-actions
github-actions Bot requested review from kaburk and ryuring October 26, 2026 09:41
@ryuring
ryuring merged commit 1c22c15 into baserproject:5.4.x Oct 27, 2026
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants