Changeset 23083
- Timestamp:
- Jun 7, 2013, 6:01:12 AM (11 years ago)
- Location:
- extensions/rv_gmaps/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_gmaps/trunk/admin/admin_config.php
r20515 r23083 44 44 45 45 $gm_config['marker_icon'] = $_POST['marker_icon']; 46 $gm_config['map_type'] = $_POST['map_type']; 47 46 48 mkgetdir( dirname(rvm_get_config_file_name()) ); 47 49 $fp = fopen( rvm_get_config_file_name(), 'w'); … … 60 62 'NB_MARKERS' => rvm_get_config_var('nb_markers',40), 61 63 'NB_IMAGES_PER_MARKER' => rvm_get_config_var('nb_images_per_marker',20), 64 'MAP_TYPE' => rvm_get_config_var('map_type','ROADMAP'), 62 65 ) 63 66 ); … … 84 87 ); 85 88 } 89 86 90 $template->assign('selected_marker_icon', rvm_get_config_var('marker_icon', '') ); 87 91 88 92 $map_types = array( 93 "ROADMAP" => "Roadmap (Default)", 94 "SATELLITE" => "Satellite", 95 "HYBRID" => "Hybrid", 96 "TERRAIN" => "Terrain", 97 ); 98 $template->assign('map_types', $map_types); 89 99 ?> -
extensions/rv_gmaps/trunk/admin/admin_config.tpl
r15839 r23083 55 55 </li> 56 56 57 <li> 58 <label> 59 Default map type: 60 <select name="map_type"> 61 {html_options options=$map_types selected=$MAP_TYPE} 62 </select> 63 </label> 64 </li> 65 57 66 </ul> 58 67 -
extensions/rv_gmaps/trunk/changelog.txt
r22180 r23083 1 2.5.c 2 - admin can choose default map type (roadmap, satellite, ...) 3 - auto center and zoom when viewing map for the entire gallery 4 - fix kml namespace 5 - attempt to fix uage with https on the photo page (need test) 6 1 7 2.5.b 2 8 - more forgiving about some wrong exif gps formatting -
extensions/rv_gmaps/trunk/include/picture_map.inc.php
r13092 r23083 34 34 $template->assign( 35 35 array( 36 'MAP_TYPE' => rvm_get_config_var('map_type', 'ROADMAP'), 36 37 'U_NO_MAP' => duplicate_picture_url(), 37 38 'U_BLOWUP' => rvm_make_blowup_url( array('ll'=>$picture), array('start','box') ), -
extensions/rv_gmaps/trunk/main.inc.php
r22180 r23083 1 1 <?php /* 2 2 Plugin Name: RV Maps&Earth 3 Version: 2.5. b3 Version: 2.5.c 4 4 Description: Extend your gallery with Google Maps and Google Earth ... 5 5 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=122 … … 7 7 Author URI: http://www.modusoptimus.com/ 8 8 */ 9 define( 'RVM_PLUGIN_VERSION', '2.5. b');9 define( 'RVM_PLUGIN_VERSION', '2.5.c'); 10 10 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 11 11 … … 108 108 } 109 109 } 110 else 111 if ( isset($_GET['map']) ) 110 elseif ( isset($_GET['map']) ) 112 111 redirect( duplicate_picture_url() ); 113 112 return $pictures; -
extensions/rv_gmaps/trunk/map.php
r14181 r23083 48 48 check_restrictions($page['category']['id']); 49 49 50 if ( !isset($_GET['ll']) and ($page['section']!='categories' or isset($page['category']) ))50 if ( !isset($_GET['ll']) /*and ($page['section']!='categories' or isset($page['category']) )*/ ) 51 51 { 52 52 $img_fields = 'MIN(i.lat) s, MIN(i.lon) w, MAX(i.lat) n, MAX(i.lon) e'; … … 69 69 'CONTENT_ENCODING' => get_pwg_charset(), 70 70 'RVM_PLUGIN_VERSION' => RVM_PLUGIN_VERSION, 71 'GMAPS_API_KEY' => $conf['gmaps_api_key'],72 71 'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir, 73 72 'PLUGIN_LOCATION' => 'plugins/'.$rvm_dir, … … 76 75 'U_HOME' => make_index_url(), 77 76 'U_HOME_MAP' => rvm_make_map_index_url(), 77 'MAP_TYPE' => rvm_get_config_var('map_type', 'ROADMAP'), 78 78 ) 79 79 ); -
extensions/rv_gmaps/trunk/template/earth_kml.tpl
r3447 r23083 1 1 <?xml version="1.0" encoding="{$CONTENT_ENCODING}"?> 2 <kml xmlns="http:// earth.google.com/kml/2.2">2 <kml xmlns="http://www.opengis.net/kml/2.2"> 3 3 <Document> 4 4 <Style id="img_normal"> … … 27 27 {if not empty($region)} 28 28 <Region> 29 30 31 32 33 34 29 <LatLonAltBox> 30 <north>{$region.n}</north> 31 <south>{$region.s}</south> 32 <east>{$region.e}</east> 33 <west>{$region.w}</west> 34 </LatLonAltBox> 35 35 </Region> 36 36 {/if} … … 39 39 {foreach from=$categories item=category} 40 40 <NetworkLink> 41 42 43 41 <visibility>0</visibility> 42 <name><![CDATA[{$category.NAME}]]></name> 43 <description><![CDATA[{$category.COMMENT} 44 44 {if not empty($category.TN_SRC)} 45 45 <br/><img src="{$category.TN_SRC}" /> 46 46 {/if} 47 47 ]]></description> 48 49 50 48 <Link> 49 <href>{$category.U_KML}</href> 50 </Link> 51 51 {if not empty($category.region)} 52 53 54 55 56 57 58 59 60 61 62 63 52 <Region> 53 <LatLonAltBox> 54 <north>{$category.region.n}</north> 55 <south>{$category.region.s}</south> 56 <east>{$category.region.e}</east> 57 <west>{$category.region.w}</west> 58 </LatLonAltBox> 59 </Region> 60 <TimeSpan> 61 <begin>{$category.region.min_date}</begin> 62 <end>{$category.region.max_date}</end> 63 </TimeSpan> 64 64 {/if} 65 65 </NetworkLink> -
extensions/rv_gmaps/trunk/template/map.tpl
r22180 r23083 48 48 { 49 49 var mapOptions = { 50 mapTypeId: google.maps.MapTypeId. ROADMAP,50 mapTypeId: google.maps.MapTypeId.{/literal}{$MAP_TYPE}{literal}, 51 51 overviewMapControl: true, 52 52 overviewMapControlOptions: {opened: true} … … 56 56 { 57 57 {/literal} 58 58 {if isset($initial_bounds)} 59 59 mapOptions.iniBounds = new google.maps.LatLngBounds( new google.maps.LatLng({$initial_bounds.s},{$initial_bounds.w}), new google.maps.LatLng({$initial_bounds.n},{$initial_bounds.e}) ); 60 60 mapOptions.center = mapOptions.iniBounds.getCenter(); 61 62 63 64 61 {else} 62 mapOptions.center = new google.maps.LatLng(0,0); 63 mapOptions.zoom = 2; 64 {/if} 65 65 {literal} 66 66 } … … 176 176 <div class="titlebar_links" > 177 177 <span id="dataLoadStatus"></span> 178 <a id="aKml" href="" type="application/vnd.google-earth.kml+xml" class="gmnoprint"><img src=" http://maps.google.com/mapfiles/ms/view_as_kml.png" width="16" height="16" alt="kml"> <span>KML</span></a>179 <a id="aLinkToThisPage" href="" class="gmnoprint"><img src=" http://maps.google.com/mapfiles/bar_icon_link.gif" alt="<->" width="16" height="16"> <span>{'Link to this page'|@translate}</span></a>178 <a id="aKml" href="" type="application/vnd.google-earth.kml+xml" class="gmnoprint"><img src="//maps.google.com/mapfiles/ms/view_as_kml.png" width="16" height="16" alt="kml"> <span>KML</span></a> 179 <a id="aLinkToThisPage" href="" class="gmnoprint"><img src="//maps.google.com/mapfiles/bar_icon_link.gif" alt="<->" width="16" height="16"> <span>{'Link to this page'|@translate}</span></a> 180 180 <a id="aBlowup" href="" onclick="return PwgDataHandler.blowupUrl(this.href);" class="gmnoprint" title="{'show all photos around this location'|@translate}"> 181 181 <img src="{$PLUGIN_ROOT_URL}/icons/pic_s.gif" alt="" title="{'show all photos around this location'|@translate}"> -
extensions/rv_gmaps/trunk/template/page_linker.js
r12700 r23083 28 28 vars['ll'] = map.getCenter().toUrlValue(5); 29 29 vars['z'] = map.getZoom(); 30 if ( map.getMapTypeId()===google.maps.MapTypeId.ROADMAP ) 31 { if (vars['t']) vars['t']=null; } 32 else 33 vars['t']=map.getMapTypeId(); 30 vars['t']=map.getMapTypeId(); 34 31 35 32 var url = document.location.protocol+'//'+document.location.hostname+document.location.pathname; -
extensions/rv_gmaps/trunk/template/picture_map_content.tpl
r22180 r23083 1 1 {html_head} 2 <script src=" http://maps.googleapis.com/maps/api/js?sensor=false&language={$lang_info.code}" type="text/javascript"></script>2 <script src="//maps.googleapis.com/maps/api/js?sensor=false&language={$lang_info.code}" type="text/javascript"></script> 3 3 {combine_script id='jquery' load='header' path='themes/default/js/jquery.min.js'} 4 4 {combine_script id='jquery.colorbox' load='async' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} … … 45 45 zoom : 1, 46 46 {/if}{literal} 47 mapTypeId: google.maps.MapTypeId. ROADMAP47 mapTypeId: google.maps.MapTypeId.{/literal}{$MAP_TYPE}{literal} 48 48 }; 49 49
Note: See TracChangeset
for help on using the changeset viewer.