Skip to content

Commit 61f929a

Browse files
author
Berges Yannick
committed
Adding map style via snazzy map
1 parent 2fcc053 commit 61f929a

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

language/en-GB/en-GB.mod_flexigooglemap.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,6 @@ FLEXI_GOOGLEMAP_FORCEITEMID="Force itemid"
8787
FLEXI_GOOGLEMAP_FORCEITEMID_DESC="You can use an specific itemid to manage display item after link."
8888
FLEXI_GOOGLEMAP_RATIOMAP="Map ratio"
8989
FLEXI_GOOGLEMAP_RATIOMAP_DESC="Change this setting in % to decreases the margin of bottom map. We need this option for responsive map"
90+
91+
FLEXI_GOOGLEMAP_STYLE="Map style<br/><small><a href="https://snazzymaps.com/" target="_blank">Gen style</a></small>"
92+
FLEXI_GOOGLEMAP_STYLE_DESC="Copie Past json code done by snazzy mpas. BECARFULL USE [] AT START AND END OF VALUE"

language/fr-FR/fr-FR.mod_flexigooglemap.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,6 @@ FLEXI_GOOGLEMAP_FORCEITEMID="Forcer l'itemid"
9090
FLEXI_GOOGLEMAP_FORCEITEMID_DESC="En insérant un itemid dans ce champ vous pourrez gérer l'affichage de la page affichée via le lien lire la suite."
9191
FLEXI_GOOGLEMAP_RATIOMAP="Ratio carte"
9292
FLEXI_GOOGLEMAP_RATIOMAP_DESC="Changer cette valeur en % pour diminuer ou augmenter la marge base de votre carte. Ce paramètre est nécessaire pour un affichage responsive"
93+
94+
FLEXI_GOOGLEMAP_STYLE="Style carte<br/><small><a href="https://snazzymaps.com/" target="_blank">Génération</a></small>"
95+
FLEXI_GOOGLEMAP_STYLE_DESC="Copié coller le code json créé via snazzy mpas. ATTENTION VEILLEZ BIEN METTRE LES [] en début et fin"

mod_flexigooglemap.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@
157157
<option value="0">FLEXI_GOOGLEMAP_NO</option>
158158
<option value="1">FLEXI_GOOGLEMAP_YES</option>
159159
</field>
160+
161+
<field name="style" type="textarea" cols="38" rows="5" default="[your style code]" label="FLEXI_GOOGLEMAP_STYLE" description="FLEXI_GOOGLEMAP_STYLE_DESC"/>
160162

161163
<field name="" type="separator" default="FLEXI_GOOGLEMAP_INFOWINDOWS" level="level1" />
162164
<field

tmpl/default.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272

7373
$ratiomap = $params->get('ratiomap','');
7474

75+
$style = $params->get('style','');
76+
7577

7678

7779
jimport( 'joomla.application.component.controller' );
@@ -198,14 +200,15 @@
198200
var icons = [<?php echo $markerdisplay; ?>]
199201
var iconsLength = icons.length;
200202

201-
202203
var map = new google.maps.Map(document.getElementById('map'), {
203204
zoom: 16,
204205
center: new google.maps.LatLng(-37.92, 151.25),
205206
mapTypeId: google.maps.MapTypeId.<?php echo $maptype;?>,
206207
mapTypeControl: false,
207208
streetViewControl: false,
208209
panControl: false,
210+
styles: <?php echo $style; ?>,
211+
209212
zoomControlOptions: {
210213
position: google.maps.ControlPosition.LEFT_BOTTOM
211214
}

0 commit comments

Comments
 (0)