Ignore:
Timestamp:
Dec 29, 2013, 3:14:42 PM (10 years ago)
Author:
rvelices
Message:

rv_gmaps compatible with nez latitude/longitude fields in piwigo core 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/main.inc.php

    r25367 r26331  
    2121
    2222global $conf;
    23 if (@$conf['gmaps_auto_sync'])
    24 {
    25   $conf['use_exif_mapping']['lat'] = 'lat';
    26   $conf['use_exif_mapping']['lon'] = 'lon';
    27   add_event_handler('format_exif_data', 'rvm_format_exif', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
    28 }
    2923
    3024function rvm_index_cat_thumbs_displayed()
     
    9084function rvm_picture_pictures_data($pictures)
    9185{
    92         if ( isset($pictures['current']['lat']) and isset($pictures['current']['lon']) )
     86        if ( isset($pictures['current']['latitude']) and isset($pictures['current']['longitude']) )
    9387        {
    9488                global $template;
    95                 $template->append('head_elements', '<meta name=geo.position content='.$pictures['current']['lat'].';'.$pictures['current']['lon'].'>' );
     89                $template->append('head_elements', '<meta name=geo.position content='.$pictures['current']['latitude'].';'.$pictures['current']['longitude'].'>' );
    9690                include_once( dirname(__FILE__) .'/include/functions.php');
    9791                rvm_load_language();
     
    132126}
    133127
    134 function rvm_format_exif($exif, $file, $map)
    135 {
    136   if (isset($map['lat']))
    137   {
    138                 include_once( dirname(__FILE__) .'/include/functions_metadata.php');
    139                 $ll = exif_to_lat_lon($exif);
    140                 if (is_array($ll))
    141                 {
    142                         $exif[$map['lat']] = $ll[0];
    143                         $exif[$map['lon']] = $ll[1];
    144                 }
    145   }
    146   return $exif;
    147 }
    148 
    149128if (defined('IN_ADMIN')) {
    150129        include_once(dirname(__FILE__).'/admin/admin_boot.php');
Note: See TracChangeset for help on using the changeset viewer.