承接 tdoescher/googlemaps-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tdoescher/googlemaps-bundle

Composer 安装命令:

composer require tdoescher/googlemaps-bundle

包简介

Content Element für Google Maps Embed API oder HTML-Code

README 文档

README

Contao 5 Bundle zur Einbindung von Google Maps als Content-Element. Es stehen zwei Element-Typen zur Verfügung:

  • Google Maps Embed – Einbindung per iFrame via Google Maps Embed API (API-Key erforderlich)
  • Google Maps HTML – Ausgabe von benutzerdefiniertem HTML-Code der Google Maps JavaScript API

Content-Elemente

Google Maps Embed (googlemaps_embed)

Bettet eine Google Maps Karte per iFrame ein. Die Karte wird über die Google Maps Embed API geladen.

Felder:

Feld Beschreibung Pflichtfeld
googlemaps_title Titel des iFrame (Barrierefreiheit) Nein
googlemaps_apikey Google Maps API-Key Ja
googlemaps_zoom Zoom-Stufe (Standard: 16) Ja
googlemaps_address Adresse oder Ortsbezeichnung Ja

Im Backend wird die eingetragene Adresse als Vorschau angezeigt.

Google Maps HTML (googlemaps_html)

Gibt benutzerdefiniertes HTML aus, das z. B. über die Google Maps JavaScript API erzeugt wurde. Der Code wird direkt aus dem Feld unfilteredHtml ausgegeben.

Im Backend wird ein statischer Platzhaltertext angezeigt.

CSP-Konfiguration

Die Templates setzen automatisch die erforderlichen Content Security Policy Header:

Embed-Element:

  • frame-src https://www.google.com

HTML-Element:

  • connect-src https://*.google.com, https://*.googleapis.com, https://*.gstatic.com
  • font-src https://fonts.gstatic.com
  • img-src https://*.google.com, https://*.googleapis.com, https://*.googleusercontent.com, https://*.gstatic.com
  • script-src https://*.google.com, https://*.googleapis.com
  • style-src 'unsafe-inline' https://fonts.googleapis.com

Template-Anpassung

Die Twig-Templates befinden sich unter contao/templates/content_element/ und können wie bei Contao üblich überschrieben werden:

  • googlemaps_embed.html.twig
  • googlemaps_html.html.twig

Beide Templates erweitern @Contao/content_element/_base.html.twig und verwenden responsive Container mit BEM-Klassen:

.content-googlemaps-embed__container
.content-googlemaps-embed__responsive

.content-googlemaps-html__container
.content-googlemaps-html__responsive

tdoescher/googlemaps-bundle 适用场景与选型建议

tdoescher/googlemaps-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.85k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2021 年 10 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 tdoescher/googlemaps-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tdoescher/googlemaps-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 tdoescher/googlemaps-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4.85k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 23
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2021-10-12