Changeset 5063 for extensions/edit_gmaps
- Timestamp:
- Mar 6, 2010, 6:53:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/admin_edit.tpl
r5062 r5063 157 157 {literal} 158 158 //<![<!--CDATA[ 159 159 var map; 160 160 var controleMiniCarte ; 161 161 function ajoutControle(newZoom){ … … 167 167 168 168 controleMiniCarte = new google.maps.OverviewMapControl(new google.maps.Size(300,200)); 169 controleMiniCarte.setMapType(G_PHYSICAL_MAP);169 // controleMiniCarte.setMapType(G_PHYSICAL_MAP); 170 170 map.addControl(controleMiniCarte); 171 171 172 172 } 173 } 173 } 174 174 175 function onLoad() 175 176 { 176 177 if (!GBrowserIsCompatible()) return; 177 178 var mapElement = document.getElementById("map"); 178 varmap = new GMap2(document.getElementById("map"),{mapTypes: [G_SATELLITE_MAP,G_HYBRID_MAP,G_NORMAL_MAP,G_PHYSICAL_MAP,G_SATELLITE_3D_MAP]});179 map = new GMap2(document.getElementById("map"),{mapTypes: [G_SATELLITE_MAP,G_HYBRID_MAP,G_NORMAL_MAP,G_PHYSICAL_MAP,G_SATELLITE_3D_MAP]}); 179 180 map.addControl(new GLargeMapControl3D()); 180 181 … … 200 201 201 202 {literal} 202 if ( !map.isLoaded() ) 203 map.setCenter( new GLatLng(49,3), 4); 204 try { 203 if ( !map.isLoaded() ) map.setCenter( new GLatLng(49,3), 4); 204 try { 205 205 // the overview must be added after setting map center 206 206 //var ovcontrol = new GOverviewMapControl(new GSize(165,165)); 207 //map.addControl(ovcontrol); 208 209 // var ov_map = ovcontrol.getOverviewMap(); 207 // map.addControl(ovcontrol); 210 208 GEvent.addListener(map, "zoomend", function() { 211 209 var newZoom = map.getZoom(); … … 213 211 } ); 214 212 GEvent.addListener(map, 'maptypechanged', function(){ 215 216 if (typeof(controleMiniCarte)=="undefined" ) return; 217 var ov_map = controleMiniCarte.getOverviewMap(); 218 ov_map.setMapType(map.getCurrentMapType()); 219 220 213 if (typeof(controleMiniCarte)!="undefined" ) { 214 var ov_map = controleMiniCarte.getOverviewMap(); 215 if (ov_map) ov_map.setMapType(map.getCurrentMapType() ); 216 } 221 217 }); 222 223 } 218 } 224 219 catch(e){ alert( e.message ); } 225 220
Note: See TracChangeset
for help on using the changeset viewer.