Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php |
— | — | @@ -58,21 +58,22 @@ |
59 | 59 | public function addSpecificMapHTML() { |
60 | 60 | global $wgJsMimeType; |
61 | 61 | |
62 | | - // TODO |
63 | 62 | $this->output .=<<<END |
64 | | -<div id="$this->mapName" style="width:100%; height:100%"></div> |
| 63 | + |
| 64 | +<div id="$this->mapName" class="$this->class" style="$this->style" ></div> |
65 | 65 | <script type="$wgJsMimeType"> /*<![CDATA[*/ |
66 | 66 | addOnloadHook( |
67 | | - function() { |
68 | | - var latlng = new google.maps.LatLng(-34.397, 150.644); |
69 | | - var myOptions = { |
70 | | - zoom: 8, |
71 | | - center: latlng, |
72 | | - mapTypeId: google.maps.MapTypeId.ROADMAP |
73 | | - }; |
74 | | - var map = new google.maps.Map(document.getElementById("$this->mapName"), myOptions); |
75 | | -} |
| 67 | + function() { |
| 68 | + var latlng = new google.maps.LatLng(-34.397, 150.644); |
| 69 | + var myOptions = { |
| 70 | + zoom: 8, |
| 71 | + center: latlng, |
| 72 | + mapTypeId: google.maps.MapTypeId.ROADMAP |
| 73 | + }; |
| 74 | + var map = new google.maps.Map(document.getElementById("$this->mapName"), myOptions); |
| 75 | +); |
76 | 76 | /*]]>*/ </script> |
| 77 | + |
77 | 78 | END; |
78 | 79 | |
79 | 80 | } |
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | if (empty($egGoogleMaps3OnThisPage)) { |
67 | 67 | $egGoogleMaps3OnThisPage = 0; |
68 | 68 | |
69 | | - $output .= "<script type='$wgJsMimeType' src='http://maps.google.com/maps/api/js?sensor=false&language={$wgLang->getCode()}'><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion'></script>"; |
| 69 | + $output .= "<script type='$wgJsMimeType' src='http://maps.google.com/maps/api/js?sensor=false&language={$wgLang->getCode()}'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion'></script>"; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -99,14 +99,14 @@ |
100 | 100 | // Loop through the available mapping features, load and initialize them. |
101 | 101 | foreach($egMapsAvailableFeatures as $key => $values) { |
102 | 102 | // Load and optionally initizlize feature. |
103 | | - if (array_key_exists('class', $values) && array_key_exists('file', $values) && array_key_exists('local', $values)) { |
| 103 | + if (array_key_exists('class', $values) && array_key_exists('file', $values)) { |
104 | 104 | $wgAutoloadClasses[$values['class']] = array_key_exists('local', $values) && $values['local'] ? $egMapsIP . '/' . $values['file'] : $IP . '/extensions/' . $values['file']; |
105 | 105 | if (method_exists($values['class'], 'initialize')) call_user_func(array($values['class'], 'initialize')); |
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | 109 | // Loop through the available mapping services to load and initialize their general classes. |
110 | | - foreach ($egMapsServices as $serviceData) { |
| 110 | + foreach ($egMapsServices as $serviceData) { |
111 | 111 | if (array_key_exists('classes', $serviceData)) { |
112 | 112 | foreach($serviceData['classes'] as $class) { |
113 | 113 | $file = array_key_exists('local', $class) && $class['local'] ? $egMapsIP . '/' . $class['file'] : $IP . '/extensions/' . $class['file']; |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | |
201 | 201 | MapsGoogleMaps::validateGoogleMapsKey(); |
202 | 202 | |
203 | | - $output .= "<script src='http://maps.google.com/maps?file=api&v=2&key=$egGoogleMapsKey&hl={$wgLang->getCode()}' type='$wgJsMimeType'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps/GoogleMapFunctions.min.js?$egMapsStyleVersion'></script><script type='$wgJsMimeType'>window.unload = GUnload;</script>"; |
| 203 | + $output .= "<script src='http://maps.google.com/maps?file=api&v=2&key=$egGoogleMapsKey&hl={$wgLang->getCode()}' type='$wgJsMimeType'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps/GoogleMapFunctions.min.js?$egMapsStyleVersion'></script><script type='$wgJsMimeType'>window.unload = GUnload;</script>"; |
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | |
155 | 155 | if (empty($egYahooMapsOnThisPage)) { |
156 | 156 | $egYahooMapsOnThisPage = 0; |
157 | | - $output .= "<script type='$wgJsMimeType' src='http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=$egYahooMapsKey'></script> |
| 157 | + $output .= "<script type='$wgJsMimeType' src='http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=$egYahooMapsKey'></script> |
158 | 158 | <script type='$wgJsMimeType' src='$egMapsScriptPath/YahooMaps/YahooMapFunctions.min.js?$egMapsStyleVersion'></script>"; |
159 | 159 | } |
160 | 160 | } |