Changeset 6609
- Timestamp:
- Jun 26, 2010, 9:13:30 PM (14 years ago)
- Location:
- extensions/rv_gmaps/trunk/template
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_gmaps/trunk/template/map.tpl
r6245 r6609 45 45 46 46 var mapElement = document.getElementById("map"); 47 map = new GMap2( mapElement );47 map = new google.maps.Map2( mapElement ); 48 48 49 49 map.addMapType( G_PHYSICAL_MAP ); 50 map.addControl(new GLargeMapControl3D());51 map.addControl(new GHierarchicalMapTypeControl());52 map.addControl(new GScaleControl());50 map.addControl(new google.maps.LargeMapControl3D()); 51 map.addControl(new google.maps.HierarchicalMapTypeControl()); 52 map.addControl(new google.maps.ScaleControl()); 53 53 54 54 pwgPageLinker = new PageLinker(map, "aLinkToThisPage" ); … … 57 57 {/literal} 58 58 {if isset($initial_bounds)} 59 var bounds = new GLatLngBounds( new GLatLng({$initial_bounds.s},{$initial_bounds.w}), new GLatLng({$initial_bounds.n},{$initial_bounds.e}) );59 var bounds = 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 map.setCenter( bounds.getCenter(), map.getBoundsZoomLevel( bounds ) ); 61 61 {/if} 62 62 {literal} 63 63 if ( !map.isLoaded() ) 64 map.setCenter( new GLatLng(0,0), 2 );64 map.setCenter( new google.maps.LatLng(0,0), 2 ); 65 65 } 66 66 67 67 try { 68 68 // the overview must be added after setting map center 69 var ovcontrol = new GOverviewMapControl(new GSize(165,165));69 var ovcontrol = new google.maps.OverviewMapControl(new google.maps.Size(165,165)); 70 70 map.addControl(ovcontrol); 71 71 } … … 78 78 79 79 map.pwgDataLoader = new PwgDataLoader(map, {rectangle_of_confusion: pwgMarkerIcon.iconSize} ); 80 GEvent.addListener(map.pwgDataLoader, "dataloading", function() {80 google.maps.Event.addListener(map.pwgDataLoader, "dataloading", function() { 81 81 var pre = '<img src="{/literal}{$PLUGIN_ROOT_URL}{literal}/icons/progress_s.gif" width="16" height="16" alt="~" /> '; 82 82 document.getElementById("dataLoadStatus").innerHTML = pre + Localization.get("Loading"); … … 84 84 ); 85 85 86 GEvent.addListener(map.pwgDataLoader, "dataloadfailed", function(responseCode) {86 google.maps.Event.addListener(map.pwgDataLoader, "dataloadfailed", function(responseCode) { 87 87 document.getElementById("dataLoadStatus").innerHTML = Localization.get("Failed") + " "+responseCode; 88 88 } … … 90 90 91 91 map.pwgDataHandler = new PwgDataHandler(map, {icon: pwgMarkerIcon, show_all_img_src: "{/literal}{$PLUGIN_ROOT_URL}{literal}/icons/pic_s.gif" } ); 92 GEvent.addListener(map.pwgDataLoader, "dataloaded", map.pwgDataHandler.handle.bind(map.pwgDataHandler) );92 google.maps.Event.addListener(map.pwgDataLoader, "dataloaded", map.pwgDataHandler.handle.bind(map.pwgDataHandler) ); 93 93 94 94 map.pwgDataLoader.start( "{/literal}{$U_MAP_DATA}{literal}" ); … … 96 96 if (document.is_debug) 97 97 { 98 GEvent.addListener(map, "moveend", function() { GLog.write("movend c:"+map.getCenter().toUrlValue());} );99 GEvent.addListener(map, "maptypechanged", function() { GLog.write("maptypechanged");} );100 GEvent.addListener(map, "infowindowopen", function() { GLog.write("infowindowopen");} );101 GEvent.addListener(map, "infowindowclose", function() { GLog.write("infowindowclose");} );98 google.maps.Event.addListener(map, "moveend", function() { google.maps.Log.write("movend c:"+map.getCenter().toUrlValue());} ); 99 google.maps.Event.addListener(map, "maptypechanged", function() { google.maps.Log.write("maptypechanged");} ); 100 google.maps.Event.addListener(map, "infowindowopen", function() { google.maps.Log.write("infowindowopen");} ); 101 google.maps.Event.addListener(map, "infowindowclose", function() { google.maps.Log.write("infowindowclose");} ); 102 102 } 103 103 } … … 117 117 if (!q.length) return false; 118 118 if (!geocoder) 119 geocoder = new GClientGeocoder();119 geocoder = new google.maps.ClientGeocoder(); 120 120 geocoder.getLocations(q, function(resp) 121 121 { … … 136 136 case 7: case 8: zoom=16; break; //intersection/exact 137 137 } 138 map.setCenter( new GLatLng( resp.Placemark[0].Point.coordinates[1], resp.Placemark[0].Point.coordinates[0] ), zoom);138 map.setCenter( new google.maps.LatLng( resp.Placemark[0].Point.coordinates[1], resp.Placemark[0].Point.coordinates[0] ), zoom); 139 139 } 140 140 else … … 169 169 if (lang_str == undefined) 170 170 { 171 if (document.is_debug) GLog.write("Language string undefined '"+ str+"'");171 if (document.is_debug) google.maps.Log.write("Language string undefined '"+ str+"'"); 172 172 return str; 173 173 } -
extensions/rv_gmaps/trunk/template/markers/small_bullet_orange.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "{$PLUGIN_ROOT_URL}/template/markers/small_bullet_orange.png"; 3 icon.iconSize = new GSize(11, 11);4 icon.iconAnchor = new GPoint(5, 5);5 icon.infoWindowAnchor = new GPoint(5, 0);3 icon.iconSize = new google.maps.Size(11, 11); 4 icon.iconAnchor = new google.maps.Point(5, 5); 5 icon.infoWindowAnchor = new google.maps.Point(5, 0); 6 6 return icon; -
extensions/rv_gmaps/trunk/template/markers/small_bullet_red.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "{$PLUGIN_ROOT_URL}/template/markers/small_bullet_red.png"; 3 icon.iconSize = new GSize(11, 11);4 icon.iconAnchor = new GPoint(5, 5);5 icon.infoWindowAnchor = new GPoint(5, 0);3 icon.iconSize = new google.maps.Size(11, 11); 4 icon.iconAnchor = new google.maps.Point(5, 5); 5 icon.infoWindowAnchor = new google.maps.Point(5, 0); 6 6 return icon; -
extensions/rv_gmaps/trunk/template/markers/small_bullet_yellow.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "{$PLUGIN_ROOT_URL}/template/markers/small_bullet_yellow.png"; 3 icon.iconSize = new GSize(11, 11);4 icon.iconAnchor = new GPoint(5, 5);5 icon.infoWindowAnchor = new GPoint(5, 0);3 icon.iconSize = new google.maps.Size(11, 11); 4 icon.iconAnchor = new google.maps.Point(5, 5); 5 icon.infoWindowAnchor = new google.maps.Point(5, 0); 6 6 return icon; -
extensions/rv_gmaps/trunk/template/markers/small_dot_blue.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png"; 3 3 icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; 4 icon.iconSize = new GSize(12, 20);5 icon.shadowSize = new GSize(22, 20);6 icon.iconAnchor = new GPoint(6, 20);7 icon.infoWindowAnchor = new GPoint(5, 1);4 icon.iconSize = new google.maps.Size(12, 20); 5 icon.shadowSize = new google.maps.Size(22, 20); 6 icon.iconAnchor = new google.maps.Point(6, 20); 7 icon.infoWindowAnchor = new google.maps.Point(5, 1); 8 8 return icon; -
extensions/rv_gmaps/trunk/template/markers/small_dot_green.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "http://labs.google.com/ridefinder/images/mm_20_green.png"; 3 3 icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; 4 icon.iconSize = new GSize(12, 20);5 icon.shadowSize = new GSize(22, 20);6 icon.iconAnchor = new GPoint(6, 20);7 icon.infoWindowAnchor = new GPoint(5, 1);4 icon.iconSize = new google.maps.Size(12, 20); 5 icon.shadowSize = new google.maps.Size(22, 20); 6 icon.iconAnchor = new google.maps.Point(6, 20); 7 icon.infoWindowAnchor = new google.maps.Point(5, 1); 8 8 return icon; -
extensions/rv_gmaps/trunk/template/markers/small_dot_purple.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "http://labs.google.com/ridefinder/images/mm_20_purple.png"; 3 3 icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; 4 icon.iconSize = new GSize(12, 20);5 icon.shadowSize = new GSize(22, 20);6 icon.iconAnchor = new GPoint(6, 20);7 icon.infoWindowAnchor = new GPoint(5, 1);4 icon.iconSize = new google.maps.Size(12, 20); 5 icon.shadowSize = new google.maps.Size(22, 20); 6 icon.iconAnchor = new google.maps.Point(6, 20); 7 icon.infoWindowAnchor = new google.maps.Point(5, 1); 8 8 return icon; -
extensions/rv_gmaps/trunk/template/markers/small_dot_red.tpl
r3447 r6609 1 var icon = new GIcon();1 var icon = new google.maps.Icon(); 2 2 icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; 3 3 icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; 4 icon.iconSize = new GSize(12, 20);5 icon.shadowSize = new GSize(22, 20);6 icon.iconAnchor = new GPoint(6, 20);7 icon.infoWindowAnchor = new GPoint(5, 1);4 icon.iconSize = new google.maps.Size(12, 20); 5 icon.shadowSize = new google.maps.Size(22, 20); 6 icon.iconAnchor = new google.maps.Point(6, 20); 7 icon.infoWindowAnchor = new google.maps.Point(5, 1); 8 8 return icon;
Note: See TracChangeset
for help on using the changeset viewer.