Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispPoint.php |
— | — | @@ -75,8 +75,8 @@ |
76 | 76 | "$this->mapName", |
77 | 77 | { |
78 | 78 | zoom: $this->zoom, |
79 | | - lat: $this->centre_lat, |
80 | | - lon: $this->centre_lon, |
| 79 | + lat: $this->centreLat, |
| 80 | + lon: $this->centreLon, |
81 | 81 | types: [], |
82 | 82 | mapTypeId: $this->type |
83 | 83 | }, |
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php |
— | — | @@ -73,8 +73,8 @@ |
74 | 74 | "$this->mapName", |
75 | 75 | { |
76 | 76 | zoom: $this->zoom, |
77 | | - lat: $this->centre_lat, |
78 | | - lon: $this->centre_lon, |
| 77 | + lat: $this->centreLat, |
| 78 | + lon: $this->centreLon, |
79 | 79 | types: [], |
80 | 80 | mapTypeId: $this->type |
81 | 81 | }, |
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispPoint.php |
— | — | @@ -70,8 +70,8 @@ |
71 | 71 | function() { |
72 | 72 | initOpenLayer( |
73 | 73 | '$this->mapName', |
74 | | - $this->centre_lon, |
75 | | - $this->centre_lat, |
| 74 | + $this->centreLon, |
| 75 | + $this->centreLat, |
76 | 76 | $this->zoom, |
77 | 77 | [$layerItems], |
78 | 78 | [$this->controls], |
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispMap.php |
— | — | @@ -63,8 +63,8 @@ |
64 | 64 | function() { |
65 | 65 | initOpenLayer( |
66 | 66 | '$this->mapName', |
67 | | - $this->centre_lon, |
68 | | - $this->centre_lat, |
| 67 | + $this->centreLon, |
| 68 | + $this->centreLat, |
69 | 69 | $this->zoom, |
70 | 70 | [$layerItems], |
71 | 71 | [$this->controls], |
Index: trunk/extensions/Maps/ParserFunctions/DisplayPoint/Maps_BasePointMap.php |
— | — | @@ -157,14 +157,14 @@ |
158 | 158 | if ( empty( $this->centre ) ) { |
159 | 159 | if ( count( $this->markerData ) == 1 ) { |
160 | 160 | // If centre is not set and there is exactelly one marker, use it's coordinates. |
161 | | - $this->centre_lat = Xml::escapeJsString( $this->markerData[0]['lat'] ); |
162 | | - $this->centre_lon = Xml::escapeJsString( $this->markerData[0]['lon'] ); |
| 161 | + $this->centreLat = Xml::escapeJsString( $this->markerData[0]['lat'] ); |
| 162 | + $this->centreLon = Xml::escapeJsString( $this->markerData[0]['lon'] ); |
163 | 163 | } |
164 | 164 | elseif ( count( $this->markerData ) > 1 ) { |
165 | 165 | // If centre is not set and there are multiple markers, set the values to null, |
166 | 166 | // to be auto determined by the JS of the mapping API. |
167 | | - $this->centre_lat = 'null'; |
168 | | - $this->centre_lon = 'null'; |
| 167 | + $this->centreLat = 'null'; |
| 168 | + $this->centreLon = 'null'; |
169 | 169 | } |
170 | 170 | else { |
171 | 171 | // If centre is not set and there are no markers, use the default latitude and longitutde. |
— | — | @@ -176,8 +176,8 @@ |
177 | 177 | |
178 | 178 | // If the centre is not false, it will be a valid coordinate, which can be used to set the latitude and longitutde. |
179 | 179 | if ( $this->centre ) { |
180 | | - $this->centre_lat = Xml::escapeJsString( $this->centre['lat'] ); |
181 | | - $this->centre_lon = Xml::escapeJsString( $this->centre['lon'] ); |
| 180 | + $this->centreLat = Xml::escapeJsString( $this->centre['lat'] ); |
| 181 | + $this->centreLon = Xml::escapeJsString( $this->centre['lon'] ); |
182 | 182 | } |
183 | 183 | else { // If it's false, the coordinate was invalid, or geocoding failed. Either way, the default's should be used. |
184 | 184 | $this->setCentreDefaults(); |
— | — | @@ -190,7 +190,7 @@ |
191 | 191 | */ |
192 | 192 | private function setCentreDefaults() { |
193 | 193 | global $egMapsMapLat, $egMapsMapLon; |
194 | | - $this->centre_lat = $egMapsMapLat; |
195 | | - $this->centre_lon = $egMapsMapLon; |
| 194 | + $this->centreLat = $egMapsMapLat; |
| 195 | + $this->centreLon = $egMapsMapLon; |
196 | 196 | } |
197 | 197 | } |
Index: trunk/extensions/Maps/ParserFunctions/DisplayMap/Maps_BaseMap.php |
— | — | @@ -69,16 +69,16 @@ |
70 | 70 | private function setCentre() { |
71 | 71 | if ( empty( $this->coordinates ) ) { // If centre is not set, use the default latitude and longitutde. |
72 | 72 | global $egMapsMapLat, $egMapsMapLon; |
73 | | - $this->centre_lat = $egMapsMapLat; |
74 | | - $this->centre_lon = $egMapsMapLon; |
| 73 | + $this->centreLat = $egMapsMapLat; |
| 74 | + $this->centreLon = $egMapsMapLon; |
75 | 75 | } |
76 | 76 | else { // If a centre value is set, geocode when needed and use it. |
77 | 77 | $this->coordinates = MapsGeocoder::attemptToGeocode( $this->coordinates, $this->geoservice, $this->serviceName ); |
78 | 78 | |
79 | 79 | // If the centre is not false, it will be a valid coordinate, which can be used to set the latitude and longitutde. |
80 | 80 | if ( $this->coordinates ) { |
81 | | - $this->centre_lat = Xml::escapeJsString( $this->coordinates['lat'] ); |
82 | | - $this->centre_lon = Xml::escapeJsString( $this->coordinates['lon'] ); |
| 81 | + $this->centreLat = Xml::escapeJsString( $this->coordinates['lat'] ); |
| 82 | + $this->centreLon = Xml::escapeJsString( $this->coordinates['lon'] ); |
83 | 83 | } |
84 | 84 | else { // If it's false, the coordinate was invalid, or geocoding failed. Either way, the default's should be used. |
85 | 85 | $this->setCentreDefaults(); |
Index: trunk/extensions/Maps/ParserFunctions/GeoFunctions/Maps_GeoFunctions.php |
— | — | @@ -56,43 +56,28 @@ |
57 | 57 | |
58 | 58 | // We already know the $parser. |
59 | 59 | array_shift( $args ); |
60 | | - |
61 | | - // Default parameter assignment, to allow for nameless syntax. |
62 | | - $defaultParams = array( 'location1', 'location2' ); |
63 | | - $parameters = array(); |
64 | 60 | |
65 | | - // Determine all parameter names and value, and take care of default (nameless) |
66 | | - // parameters, by turning them into named ones. |
67 | | - foreach( $args as $arg ) { |
68 | | - $parts = explode( '=', $arg ); |
69 | | - if ( count( $parts ) == 1 ) { |
70 | | - if ( count( $defaultParams ) > 0 ) { |
71 | | - $defaultParam = array_shift( $defaultParams ); |
72 | | - $parameters[$defaultParam] = trim( $parts[0] ); |
73 | | - } |
74 | | - } else { |
75 | | - $name = strtolower( trim( array_shift( $parts ) ) ); |
76 | | - $parameters[$name] = trim( implode( $parts ) ); |
77 | | - } |
78 | | - } |
| 61 | + $manager = new ValidatorManager(); |
79 | 62 | |
80 | | - $parameterInfo = array( |
81 | | - 'location1' => array( |
82 | | - 'required' => true |
| 63 | + $parameters = $manager->manageMapparameters( |
| 64 | + $parameters, |
| 65 | + array( |
| 66 | + 'location1' => array( |
| 67 | + 'required' => true |
| 68 | + ), |
| 69 | + 'location2' => array( |
| 70 | + 'required' => true |
| 71 | + ), |
83 | 72 | ), |
84 | | - 'location2' => array( |
85 | | - 'required' => true |
86 | | - ), |
| 73 | + array( 'location1', 'location2' ) |
87 | 74 | ); |
88 | 75 | |
89 | | - $manager = new ValidatorManager(); |
90 | | - |
91 | | - $parameters = $manager->manageMapparameters( $parameters, $parameterInfo ); |
92 | | - |
93 | 76 | $doCalculation = $parameters !== false; |
94 | 77 | |
95 | 78 | if ( $doCalculation ) { |
96 | | - if ( self::geocoderIsAvailable() ) { |
| 79 | + $canGeocode = self::geocoderIsAvailable(); |
| 80 | + |
| 81 | + if ( $canGeocode ) { |
97 | 82 | $start = MapsGeocoder::attemptToGeocode( $parameters['location1'] ); |
98 | 83 | $end = MapsGeocoder::attemptToGeocode( $parameters['location2'] ); |
99 | 84 | } else { |
— | — | @@ -108,25 +93,33 @@ |
109 | 94 | $output .= '<br />' . $errorList; |
110 | 95 | } |
111 | 96 | } else { |
112 | | - $errorList = ''; |
| 97 | + global $egValidatorFatalLevel; |
113 | 98 | |
114 | | - if ( !$start ) { |
115 | | - $errorList .= wfMsgExt( 'maps-invalid-coordinates', array( 'parsemag' ), $parameters['location1'] ); |
| 99 | + $fails = array(); |
| 100 | + if ( !$start ) $fails[] = $parameters['location1']; |
| 101 | + if ( !$end ) $fails[] = $parameters['location2']; |
| 102 | + |
| 103 | + switch ( $egValidatorFatalLevel ) { |
| 104 | + case Validator_ERRORS_NONE: |
| 105 | + $output = ''; |
| 106 | + break; |
| 107 | + case Validator_ERRORS_WARN: |
| 108 | + $output = '<b>' . wfMsgExt( 'validator_warning_parameters', array( 'parsemag' ), count( $fails ) ) . '</b>'; |
| 109 | + break; |
| 110 | + case Validator_ERRORS_SHOW: default: |
| 111 | + global $wgLang; |
| 112 | + |
| 113 | + if ( $canGeocode ) { |
| 114 | + $output = htmlspecialchars( wfMsgExt( 'maps_geocoding_failed', array( 'parsemag' ), $wgLang->listToText( $fails ), count( $fails ) ) ); |
| 115 | + } else { |
| 116 | + $output = htmlspecialchars( wfMsgExt( 'maps_unrecognized_coords', array( 'parsemag' ), $wgLang->listToText( $fails ), count( $fails ) ) ); |
| 117 | + } |
| 118 | + break; |
116 | 119 | } |
117 | | - |
118 | | - if ( !$end ) { |
119 | | - if ( $errorList != '' ) $errorList .= '<br />'; |
120 | | - $errorList .= wfMsgExt( 'maps-invalid-coordinates', array( 'parsemag' ), $parameters['location2'] ); |
121 | | - } |
122 | | - |
123 | | - $output = $errorList; |
124 | 120 | } |
125 | 121 | } else { |
126 | 122 | // One of the parameters is not provided, so display an error message. |
127 | | - // If the error level is Validator_ERRORS_MINIMAL, show the Validator_ERRORS_WARN message since |
128 | | - // the function could not do any work, otherwise use the error level as it is. |
129 | | - global $egValidatorErrorLevel; |
130 | | - $output = $manager->getErrorList( $egValidatorErrorLevel == Validator_ERRORS_MINIMAL ? Validator_ERRORS_WARN : $egValidatorErrorLevel ); |
| 123 | + $output = $manager->getErrorList(); |
131 | 124 | } |
132 | 125 | |
133 | 126 | return array( $output, 'noparse' => true, 'isHTML' => true ); |
— | — | @@ -139,49 +132,101 @@ |
140 | 133 | * @param Parser $parser |
141 | 134 | */ |
142 | 135 | public static function renderFindDestination( Parser &$parser ) { |
| 136 | + global $egMapsAvailableServices, $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsAvailableCoordNotations; |
| 137 | + global $egMapsCoordinateNotation, $egMapsAllowCoordsGeocoding, $egMapsCoordinateDirectional; |
| 138 | + |
143 | 139 | $args = func_get_args(); |
144 | 140 | |
145 | 141 | // We already know the $parser. |
146 | 142 | array_shift( $args ); |
147 | | - |
148 | | - // Default parameter assignment, to allow for nameless syntax. |
149 | | - $defaultParams = array( 'location', 'bearing', 'distance' ); |
150 | | - $parameters = array(); |
151 | 143 | |
152 | | - // Determine all parameter names and value, and take care of default (nameless) |
153 | | - // parameters, by turning them into named ones. |
154 | | - foreach( $args as $arg ) { |
155 | | - $parts = explode( '=', $arg ); |
156 | | - if ( count( $parts ) == 1 ) { |
157 | | - if ( count( $defaultParams ) > 0 ) { |
158 | | - $defaultParam = array_shift( $defaultParams ); |
159 | | - $parameters[$defaultParam] = trim( $parts[0] ); |
160 | | - } |
161 | | - } else { |
162 | | - $name = strtolower( trim( array_shift( $parts ) ) ); |
163 | | - $parameters[$name] = trim( implode( $parts ) ); |
164 | | - } |
165 | | - } |
| 144 | + $manager = new ValidatorManager(); |
166 | 145 | |
167 | | - $parameterInfo = array( |
168 | | - 'location' => array( |
169 | | - 'required' => true |
| 146 | + $parameters = $manager->manageMapparameters( |
| 147 | + $parameters, |
| 148 | + array( |
| 149 | + 'location' => array( |
| 150 | + 'required' => true |
| 151 | + ), |
| 152 | + 'bearing' => array( |
| 153 | + 'type' => 'float', |
| 154 | + 'required' => true |
| 155 | + ), |
| 156 | + 'distance' => array( |
| 157 | + 'type' => 'float', |
| 158 | + 'required' => true |
| 159 | + ), |
| 160 | + 'mappingservice' => array( |
| 161 | + 'criteria' => array( |
| 162 | + 'in_array' => $egMapsAvailableServices |
| 163 | + ), |
| 164 | + 'default' => false |
| 165 | + ), |
| 166 | + 'service' => array( |
| 167 | + 'criteria' => array( |
| 168 | + 'in_array' => $egMapsAvailableGeoServices |
| 169 | + ), |
| 170 | + 'default' => $egMapsDefaultGeoService |
| 171 | + ), |
| 172 | + 'format' => array( |
| 173 | + 'criteria' => array( |
| 174 | + 'in_array' => $egMapsAvailableCoordNotations |
| 175 | + ), |
| 176 | + 'aliases' => array( |
| 177 | + 'notation' |
| 178 | + ), |
| 179 | + 'default' => $egMapsCoordinateNotation |
| 180 | + ), |
| 181 | + 'allowcoordinates' => array( |
| 182 | + 'type' => 'boolean', |
| 183 | + 'default' => $egMapsAllowCoordsGeocoding |
| 184 | + ), |
| 185 | + 'directional' => array( |
| 186 | + 'type' => 'boolean', |
| 187 | + 'default' => $egMapsCoordinateDirectional |
| 188 | + ), |
170 | 189 | ), |
171 | | - 'bearing' => array( |
172 | | - 'required' => true |
173 | | - ), |
174 | | - 'distance' => array( |
175 | | - 'required' => true |
176 | | - ), |
177 | | - ); |
| 190 | + array( 'location', 'bearing', 'distance' ) |
| 191 | + ); |
178 | 192 | |
179 | | - $manager = new ValidatorManager(); |
180 | | - |
181 | | - $parameters = $manager->manageMapparameters( $parameters, $parameterInfo ); |
182 | | - |
183 | 193 | $doCalculation = $parameters !== false; |
184 | 194 | |
185 | | - // TODO |
| 195 | + if ( $doCalculation ) { |
| 196 | + $canGeocode = self::geocoderIsAvailable(); |
| 197 | + |
| 198 | + if ( $canGeocode ) { |
| 199 | + $location = MapsGeocoder::attemptToGeocode( $parameters['location'] ); |
| 200 | + } else { |
| 201 | + $location = MapsCoordinateParser::parseCoordinates( $parameters['location'] ); |
| 202 | + } |
| 203 | + |
| 204 | + if ( $location ) { |
| 205 | + $destination = self::findDestination( $location, $parameters['bearing'], $parameters['distance'] ); |
| 206 | + } else { |
| 207 | + global $egValidatorFatalLevel; |
| 208 | + switch ( $egValidatorFatalLevel ) { |
| 209 | + case Validator_ERRORS_NONE: |
| 210 | + $output = ''; |
| 211 | + break; |
| 212 | + case Validator_ERRORS_WARN: |
| 213 | + $output = '<b>' . wfMsgExt( 'validator_warning_parameters', array( 'parsemag' ), 1 ) . '</b>'; |
| 214 | + break; |
| 215 | + case Validator_ERRORS_SHOW: default: |
| 216 | + // Show an error that the location could not be geocoded or the coordinates where not recognized. |
| 217 | + if ( $canGeocode ) { |
| 218 | + $output = htmlspecialchars( wfMsgExt( 'maps_geocoding_failed', array( 'parsemag' ), $parameters['location'] ) ); |
| 219 | + } else { |
| 220 | + $output = htmlspecialchars( wfMsgExt( 'maps-invalid-coordinates', array( 'parsemag' ), $parameters['location'] ) ); |
| 221 | + } |
| 222 | + break; |
| 223 | + } |
| 224 | + } |
| 225 | + } else { |
| 226 | + // Either required parameters are missing, or there are errors while having a strict error level. |
| 227 | + $output = $manager->getErrorList(); |
| 228 | + } |
| 229 | + |
| 230 | + return array( $output, 'noparse' => true, 'isHTML' => true ); |
186 | 231 | } |
187 | 232 | |
188 | 233 | /** |
Index: trunk/extensions/Maps/ParserFunctions/Geocode/Maps_GeocodeFunctions.php |
— | — | @@ -2,10 +2,6 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * This file contains the registration functions for the following parser functions: |
6 | | - * |
7 | | - * {{#geocode:<Address>|<param1>=<value1>|<param2>=<value2>}} |
8 | | - * {{#geocodelat:<Address>|<param1>=<value1>|<param2>=<value2>}} |
9 | | - * {{#geocodelng:<Address>|<param1>=<value1>|<param2>=<value2>}} |
10 | 6 | * |
11 | 7 | * @file Maps_GeocodeFunctions.php |
12 | 8 | * @ingroup Maps |
Index: trunk/extensions/Maps/ParserFunctions/Maps_ParserFunctions.php |
— | — | @@ -114,16 +114,19 @@ |
115 | 115 | |
116 | 116 | if ( $egValidatorErrorLevel >= Validator_ERRORS_WARN ) { |
117 | 117 | if ( count( $coordFails ) > 0 ) { |
| 118 | + // TODO: escaping |
118 | 119 | $output .= '<i>' . wfMsgExt( 'maps_unrecognized_coords_for', array( 'parsemag' ), $wgLang->listToText( $coordFails ), count( $coordFails ) ) . '</i>'; |
119 | 120 | } |
120 | 121 | |
121 | 122 | if ( count( $geoFails ) > 0 ) { |
| 123 | + // TODO: escaping |
122 | 124 | $output .= '<i>' . wfMsgExt( 'maps_geocoding_failed_for', array( 'parsemag' ), $wgLang->listToText( $geoFails ), count( $geoFails ) ) . '</i>'; |
123 | 125 | } |
124 | 126 | } |
125 | 127 | } |
126 | 128 | elseif ( $egValidatorErrorLevel >= Validator_ERRORS_MINIMAL ) { |
127 | 129 | if ( $coords == '' && ( count( $geoFails ) > 0 || count( $coordFails ) > 0 ) ) { |
| 130 | + // TODO: escaping |
128 | 131 | if ( count( $coordFails ) > 0 ) $output = '<i>' . wfMsgExt( 'maps_unrecognized_coords', array( 'parsemag' ), $wgLang->listToText( $coordFails ), count( $coordFails ) ) . '</i>'; |
129 | 132 | if ( count( $geoFails ) > 0 ) $output = '<i>' . wfMsgExt( 'maps_geocoding_failed', array( 'parsemag' ), $wgLang->listToText( $geoFails ), count( $geoFails ) ) . '</i>'; |
130 | 133 | $output .= '<i>' . wfMsg( 'maps_map_cannot_be_displayed' ) . '</i>'; |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | echo '<b>Warning:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.'; |
35 | 35 | } |
36 | 36 | else { |
37 | | - define( 'Maps_VERSION', '0.6 a12' ); |
| 37 | + define( 'Maps_VERSION', '0.6 a13' ); |
38 | 38 | |
39 | 39 | // The different coordinate notations. |
40 | 40 | define( 'Maps_COORDS_FLOAT', 'float' ); |
Index: trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispMap.php |
— | — | @@ -77,8 +77,8 @@ |
78 | 78 | mode: '$this->mode', |
79 | 79 | layer: 'osm-like', |
80 | 80 | locale: '$this->lang', |
81 | | - lat: $this->centre_lat, |
82 | | - lon: $this->centre_lon, |
| 81 | + lat: $this->centreLat, |
| 82 | + lon: $this->centreLon, |
83 | 83 | zoom: $this->zoom, |
84 | 84 | markers: [], |
85 | 85 | controls: [$this->controls] |
— | — | @@ -130,10 +130,10 @@ |
131 | 131 | $staticType = $mode['handler']; |
132 | 132 | $staticOptions = $mode['options']; |
133 | 133 | |
134 | | - $static = new $staticType( $this->centre_lat, $this->centre_lon, $this->zoom, $this->width, $this->height, $this->lang, $staticOptions ); |
| 134 | + $static = new $staticType( $this->centreLat, $this->centreLon, $this->zoom, $this->width, $this->height, $this->lang, $staticOptions ); |
135 | 135 | $rendering_url = $static->getUrl(); |
136 | 136 | |
137 | | - $alt = wfMsg( 'maps_centred_on', $this->centre_lat, $this->centre_lon ); |
| 137 | + $alt = wfMsg( 'maps_centred_on', $this->centreLat, $this->centreLon ); |
138 | 138 | $title = $this->activatable ? wfMsg( 'maps_click_to_activate' ) : $alt; |
139 | 139 | |
140 | 140 | $image = array( |
Index: trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispPoint.php |
— | — | @@ -62,8 +62,8 @@ |
63 | 63 | { |
64 | 64 | layer: 'osm-like', |
65 | 65 | locale: '$this->lang', |
66 | | - lat: $this->centre_lat, |
67 | | - lon: $this->centre_lon, |
| 66 | + lat: $this->centreLat, |
| 67 | + lon: $this->centreLon, |
68 | 68 | zoom: $this->zoom, |
69 | 69 | markers: [$this->markerString], |
70 | 70 | controls: [$this->controls] |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php |
— | — | @@ -80,8 +80,8 @@ |
81 | 81 | function() { |
82 | 82 | initializeGoogleMap('$this->mapName', |
83 | 83 | { |
84 | | - lat: $this->centre_lat, |
85 | | - lon: $this->centre_lon, |
| 84 | + lat: $this->centreLat, |
| 85 | + lon: $this->centreLon, |
86 | 86 | zoom: $this->zoom, |
87 | 87 | type: $this->type, |
88 | 88 | types: [$this->types], |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php |
— | — | @@ -83,8 +83,8 @@ |
84 | 84 | function() { |
85 | 85 | initializeGoogleMap('$this->mapName', |
86 | 86 | { |
87 | | - lat: $this->centre_lat, |
88 | | - lon: $this->centre_lon, |
| 87 | + lat: $this->centreLat, |
| 88 | + lon: $this->centreLon, |
89 | 89 | zoom: $this->zoom, |
90 | 90 | type: $this->type, |
91 | 91 | types: [$this->types], |
Index: trunk/extensions/Maps/Maps_MapFeature.php |
— | — | @@ -19,6 +19,8 @@ |
20 | 20 | * @ingroup Maps |
21 | 21 | * |
22 | 22 | * @author Jeroen De Dauw |
| 23 | + * |
| 24 | + * TODO: refactor this and subclasses to follow mw conventions and simply have a better design pattern. |
23 | 25 | */ |
24 | 26 | abstract class MapsMapFeature { |
25 | 27 | |
— | — | @@ -46,8 +48,8 @@ |
47 | 49 | |
48 | 50 | protected $mapName; |
49 | 51 | |
50 | | - protected $centre_lat; |
51 | | - protected $centre_lon; |
| 52 | + protected $centreLat; |
| 53 | + protected $centreLon; |
52 | 54 | |
53 | 55 | protected $output = ''; |
54 | 56 | protected $errorList; |
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispPoint.php |
— | — | @@ -68,8 +68,8 @@ |
69 | 69 | function() { |
70 | 70 | initializeYahooMap( |
71 | 71 | '$this->mapName', |
72 | | - $this->centre_lat, |
73 | | - $this->centre_lon, |
| 72 | + $this->centreLat, |
| 73 | + $this->centreLon, |
74 | 74 | $this->zoom, |
75 | 75 | $this->type, |
76 | 76 | [$this->types], |
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispMap.php |
— | — | @@ -61,8 +61,8 @@ |
62 | 62 | function() { |
63 | 63 | initializeYahooMap( |
64 | 64 | '$this->mapName', |
65 | | - $this->centre_lat, |
66 | | - $this->centre_lon, |
| 65 | + $this->centreLat, |
| 66 | + $this->centreLon, |
67 | 67 | $this->zoom, |
68 | 68 | $this->type, |
69 | 69 | [$this->types], |