Changeset 8456 for extensions/edit_gmaps/admin/admin_edit.php
- Timestamp:
- Jan 3, 2011, 7:39:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/admin_edit.php
r6445 r8456 1 1 <?php 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 4 if (!defined('EDIT_RV_ROOT')) 5 define( 'EDIT_RV_ROOT', PHPWG_PLUGINS_PATH.'edit_gmaps/admin/' ); 6 3 7 global $lang; 4 8 load_language('lang', dirname(__FILE__).'/../'); … … 35 39 36 40 $template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d element', '%d elements', count($page['cat_elements_id'])).' - '.$page['title']); 41 42 43 $template->assign( 44 array( 45 'EDIT_RV_ROOT' => EDIT_RV_ROOT) 46 ); 37 47 38 48 … … 99 109 unset($collection); 100 110 } 111 112 113 101 114 if ($_POST['submit']==l10n('search_title' )) 102 115 { 116 103 117 $match = $_POST['match'] ; 104 118 … … 203 217 { 204 218 $lat =1000; 205 219 206 220 if ($match<>"" && $match<>"/" ) 207 221 { 208 222 $match=str_replace(" ","+",$match); 209 210 223 $src="http://maps.google.com/maps/geo?q=".$match."&output=xml&sensor=true_or_false&key=".$conf['gmaps_api_key']; 211 224 //json,kml,xml,csv … … 216 229 $lat=$location[1]; 217 230 $lon=$location[0]; 231 218 232 $template->assign( array('lat' => $lat , 219 233 'lon' => $lon ,)); 234 $template->assign( 'coordinates', 235 array('LAT' => $lat, 236 'LON' => $lon, 237 ) 238 ); 220 239 } 221 240 … … 225 244 if (array_search($id_0,$image)) { 226 245 if ($lat==1000) { 227 $lat= ($image['lat'] <> '') ? $image['lat'] : ' 49.0' ;246 $lat= ($image['lat'] <> '') ? $image['lat'] : '100' ; 228 247 $lon= ($image['lon'] <> '') ? $image['lon'] : '3.0' ; 229 $template->assign( array('lat' => $lat , 230 'lon' => $lon , 231 ) 232 ); 233 } 248 249 $template->assign( array('zoom' => 4,'lat' => $lat , 'lon' => $lon , ) ); 250 $template->assign( 'coordinates', 251 array('LAT' => $lat, 252 'LON' => $lon, 253 ) 254 ); 255 256 } 234 257 235 258 $tpl_var = array_merge(
Note: See TracChangeset
for help on using the changeset viewer.