diff --git a/bricks.xml b/bricks.xml index 0278bd2e290aa7ce771faf951fd549cdd0cb2117..766b3319a4ddaf7db3a12367e670a49017aa5907 100644 --- a/bricks.xml +++ b/bricks.xml @@ -182,6 +182,10 @@ <setting name="city"> <locale group="quiqqer/bricks" var="brick.control.simplegooglemaps.settings.city"/> </setting> + <setting name="zoom" type="number"> + <locale group="quiqqer/bricks" var="brick.control.simplegooglemaps.settings.zoom"/> + </setting> + <setting name="api"> <locale group="quiqqer/bricks" var="brick.control.simplegooglemaps.settings.api"/> </setting> diff --git a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.css b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.css index 79f9cf01510584168294b428e77fbb59c618f598..fe7229d5f8ad504c88c13ffb81bc615baa6d33ef 100644 --- a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.css +++ b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.css @@ -1,6 +1,7 @@ #SimpleGoogleMaps { background: none; border: none; + display: block; height: 300px; width: 100%; } \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.html b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.html index 3753f426ae535aa69586326534b9c4fabeba8213..50c13b5a607cf29f3169df21399ba2e1d55a8875 100644 --- a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.html +++ b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.html @@ -1 +1 @@ -<iframe id="SimpleGoogleMaps" src="{$url}"></iframe> +<iframe id="SimpleGoogleMaps" src="{$url}"></iframe> \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php index 9b168d695643c7a2c0440439b0b455aaa06a831b..82eab0c631886c00139c412abb19395abf6863a2 100644 --- a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php +++ b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php @@ -46,16 +46,17 @@ public function getBody() $brickStreet = $this->getAttribute('street'); $brickZip = $this->getAttribute('zip'); $brickCity = $this->getAttribute('city'); + $zoom = $this->getAttribute('zoom'); $query = http_build_query(array( 'key' => trim($this->getAttribute('api')), 'q' => "{$brickTitle},{$brickZip},{$brickStreet},{$brickCity}" )); - $url = 'https://www.google.com/maps/embed/v1/place?' . $query; + $url = 'https://www.google.com/maps/embed/v1/place?' . $query . "&zoom=" . $zoom . "&"; $Engine->assign(array( - 'url' => $url + 'url' => $url )); return $Engine->fetch(dirname(__FILE__) . '/SimpleGoogleMaps.html'); diff --git a/locale.xml b/locale.xml index d67398bc2fc4bb66692a33dcdec98f36aad9d58f..9e4802e54d9036c25097e3eb1850f807be233ffb 100644 --- a/locale.xml +++ b/locale.xml @@ -490,6 +490,10 @@ Möchten Sie die Bausteine aus der Bausteinzone entfernen?</p>]]></de> <de><![CDATA[Stadt]]></de> <en><![CDATA[City]]></en> </locale> + <locale name="brick.control.simplegooglemaps.settings.zoom"> + <de><![CDATA[Zoom]]></de> + <en><![CDATA[Zoom]]></en> + </locale> <locale name="brick.control.simplegooglemaps.settings.api"> <de><![CDATA[API Key]]></de> <en><![CDATA[API Key]]></en>