Skip to content

Commit 7f3605f

Browse files
authored
Merge pull request #162 from 7tonin/master
Reset default greenred iconAnchor xy in osm_get_js
2 parents 5555e35 + 25855fc commit 7f3605f

8 files changed

Lines changed: 25 additions & 5 deletions

File tree

admin/admin_config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
'link' => $_POST['osm_right_link'],
158158
'linkcss' => $_POST['osm_right_linkcss'],
159159
'showosm' => get_boolean($_POST['osm_showosm']),
160+
'showlatlon' => get_boolean($_POST['osm_showlatlon']),
160161
),
161162
'left_menu' => array(
162163
'enabled' => get_boolean($_POST['osm_left_menu']),

admin/admin_config.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ Refer to the <a href="https://github.com/xbgmsharp/piwigo-openstreetmap/wiki" ta
6868
<label><input type="radio" name="osm_showosm" value="false" {if not $right_panel.showosm}checked="checked"{/if}/> {'No'|@translate}</label>
6969
<br/><small>{'SHOWOSM_DESC'|@translate}</small>
7070
</li>
71+
<li>
72+
<label>{'SHOWLATLON'|@translate} : </label>
73+
<label><input type="radio" name="osm_showlatlon" value="true" {if $right_panel.showlatlon}checked="checked"{/if}/> {'Yes'|@translate}</label>
74+
<label><input type="radio" name="osm_showlatlon" value="false" {if not $right_panel.showlatlon}checked="checked"{/if}/> {'No'|@translate}</label>
75+
<br/><small>{'SHOWLATLON_DESC'|@translate}</small>
76+
</li>
7177
</ul>
7278
</fieldset>
7379
<fieldset>

include/functions_map.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ function osm_get_js($conf, $local_conf, $js_data)
398398
shadowUrl: 'plugins/piwigo-openstreetmap/leaflet/images/marker-shadow.png',
399399
iconSize: [25, 41],
400400
shadowSize: [41, 41],
401-
iconAnchor: [21, 21],
402-
popupAnchor: [-10, -10]
401+
iconAnchor: [12, 41],
402+
popupAnchor: [1, -34]
403403
}
404404
});
405405

language/en_UK/plugin.lang.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
$lang['RIGHTLINKCSS_DESC'] = 'Custom CSS style to apply to the location header.';
1616
$lang['SHOWOSM'] = "Display 'View on OpenStreetMap'";
1717
$lang['SHOWOSM_DESC'] = "Add a link after the map to view it on OpenStreetMap.";
18+
$lang['SHOWLATLON'] = "Display latitude and longitude";
19+
$lang['SHOWLATLON_DESC'] = "Add latitude and longitude values next to the map.";
1820
$lang['L_MAP'] = "Left menu configuration";
1921
$lang['SHOWWORLDMAPLEFT'] = "Add a world map menu on the left";
2022
$lang['SHOWWORLDMAPLEFT_DESC'] = 'Show a world map menu on the left menu, will display all the images in the gallery.';

language/fr_FR/plugin.lang.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
$lang['RIGHTLINKCSS_DESC'] = 'Style de CSS à appliquer au titre.';
1616
$lang['SHOWOSM'] = 'Affiche \'Voir sur OpenStreetMap\'';
1717
$lang['SHOWOSM_DESC'] = 'Ajoute un lien après la carte pour être visualiser sur le site web OpenStreetMap.';
18+
$lang['SHOWLATLON'] = "Affiche la latitude et la longitude";
19+
$lang['SHOWLATLON_DESC'] = "Ajoute les valeurs de latitude et longitude à côté de la carte.";
1820

1921
$lang['L_MAP'] = 'Configuration du menu de gauche';
2022
$lang['SHOWWORLDMAPLEFT'] = 'Ajoute un menu "carte mondiale" sur la gauche';
@@ -132,4 +134,4 @@
132134
$lang['OSM_NEW_PLACE'] = 'Nouveau lieu';
133135
$lang['OSM_ADD_PLACE'] = 'Ajouter un lieu';
134136
$lang['EDIT_PLACES'] = 'Éditer les lieux sélectionnés';
135-
$lang['DELETE_PLACES'] = 'Supprimer les lieux sélectionnés';
137+
$lang['DELETE_PLACES'] = 'Supprimer les lieux sélectionnés';

maintain.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class piwigo_openstreetmap_maintain extends PluginMaintain
1717
'link' => 'Location',
1818
'linkcss' => null,
1919
'showosm' => true,
20+
'showlatlon' => false,
2021
),
2122
'left_menu' => array(
2223
'enabled' => true,
@@ -216,4 +217,4 @@ function uninstall()
216217
@unlink(PHPWG_ROOT_PATH.'osmmap.php');
217218
}
218219
}
219-
}
220+
}

picture.inc.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ function osm_insert_map($content)
7575
{if $SHOWOSM}
7676
<a href="{$OSMLINK}" target="_blank">{"VIEW_OSM"|@translate}</a>
7777
{/if}
78+
{if $SHOWLATLON}
79+
<br><span class="h-geo">{$OSMNAME} : <span class="p-latitude">{$LAT}</span>, <span class="p-longitude">{$LON}</span>
80+
</span>
81+
{/if}
7882
</dd>
7983
</div>
8084
{/if}
@@ -111,6 +115,7 @@ function osm_render_element_content()
111115
$osmname = isset($conf['osm_conf']['right_panel']['link']) ? $conf['osm_conf']['right_panel']['link'] : 'Location';
112116
$osmnamecss = isset($conf['osm_conf']['right_panel']['linkcss']) ? $conf['osm_conf']['right_panel']['linkcss'] : '';
113117
$showosm = isset($conf['osm_conf']['right_panel']['showosm']) ? $conf['osm_conf']['right_panel']['showosm'] : 'true';
118+
$showlatlon = isset($conf['osm_conf']['right_panel']['showlatlon']) ? $conf['osm_conf']['right_panel']['showlatlon'] : 'true';
114119
if (strlen($osmnamecss) != 0)
115120
{
116121
$osmnamecss = "style='".$osmnamecss."'";
@@ -145,6 +150,9 @@ function osm_render_element_content()
145150
'OSMNAMECSS' => $osmnamecss,
146151
'SHOWOSM' => $showosm,
147152
'OSMLINK' => $osmlink,
153+
'SHOWLATLON' => $showlatlon,
154+
'LAT' => $lat,
155+
'LON' => $lon,
148156
)
149157
);
150158

template/osm-map2.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ function toggle(arrow)
477477
478478
/* Update jcarousel and all witdh*/
479479
if (nb_items>0) {
480-
var nb_items_width = nb_items*45; /* img is 40px + margin 5px */
480+
var nb_items_width = nb_items*55; /* img is 40px + margin 5px + ?? 10px */
481481
var document_width = $( document ).width();
482482
var nav_width = document.getElementById('ribbon-map-nav').offsetWidth;
483483
var results_width = document.getElementById('ribbon-map-results').offsetWidth;

0 commit comments

Comments
 (0)