Index: trunk/extensions/Maps/includes/services/YahooMaps/Maps_YahooMaps.php |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | $markerItems = array(); |
129 | 129 | |
130 | 130 | foreach ( $markers as $marker ) { |
131 | | - $markerItems[] = Xml::encodeJsVar( (object)array( |
| 131 | + $markerItems[] = MapsMapper::encodeJsVar( (object)array( |
132 | 132 | 'lat' => $marker[0], |
133 | 133 | 'lon' => $marker[1], |
134 | 134 | 'title' => $marker[2], |
Index: trunk/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | $defaultGroup = wfMsg( 'maps-markers' ); |
89 | 89 | //.// TODO |
90 | 90 | foreach ( $markers as $marker ) { |
91 | | - $markerItems[false ? $marker[5] : $defaultGroup] = Xml::encodeJsVar( (object)array( |
| 91 | + $markerItems[false ? $marker[5] : $defaultGroup] = MapsMapper::encodeJsVar( (object)array( |
92 | 92 | 'lat' => $marker[0], |
93 | 93 | 'lon' => $marker[1], |
94 | 94 | 'title' => $marker[2], |
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | $markerItems = array(); |
148 | 148 | |
149 | 149 | foreach ( $markers as $marker ) { |
150 | | - $markerItems[] = Xml::encodeJsVar( (object)array( |
| 150 | + $markerItems[] = MapsMapper::encodeJsVar( (object)array( |
151 | 151 | 'lat' => $marker[0], |
152 | 152 | 'lon' => $marker[1], |
153 | 153 | 'title' => $marker[2], |
Index: trunk/extensions/Maps/includes/Maps_CoordinateParser.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | * |
44 | 44 | * @param string $coordinates The coordinates to be parsed. |
45 | 45 | * |
46 | | - * @return array or false |
| 46 | + * @return array of float or false |
47 | 47 | */ |
48 | 48 | public static function parseCoordinates( $coordinates ) { |
49 | 49 | // Handle i18n notations. |
— | — | @@ -78,8 +78,8 @@ |
79 | 79 | |
80 | 80 | // Parse both latitude and longitude to float notation, and return the result. |
81 | 81 | return array( |
82 | | - 'lat' => self::parseCoordinate( $coordinates['lat'], $coordsType ), |
83 | | - 'lon' => self::parseCoordinate( $coordinates['lon'], $coordsType ), |
| 82 | + 'lat' => (float)self::parseCoordinate( $coordinates['lat'], $coordsType ), |
| 83 | + 'lon' => (float)self::parseCoordinate( $coordinates['lon'], $coordsType ), |
84 | 84 | ); |
85 | 85 | } |
86 | 86 | |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | * @param coordinate type $targetFormat The notation to which they should be formatted. Defaults to floats. |
168 | 168 | * @param boolean $directional Indicates if the target notation should be directional. Defaults to false. |
169 | 169 | * |
170 | | - * @return array |
| 170 | + * @return array of string |
171 | 171 | */ |
172 | 172 | public static function formatToArray( array $coordinates, $targetFormat = Maps_COORDS_FLOAT, $directional = false ) { |
173 | 173 | if ( !array_key_exists( 'lat', $coordinates ) || !array_key_exists( 'lon', $coordinates ) ) { |
Index: trunk/extensions/Maps/includes/features/Maps_BasePointMap.php |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | // Each $args is an array containg the coordinate set as first element, possibly followed by meta data. |
126 | 126 | foreach ( $this->coordinates as $args ) { |
127 | 127 | $markerData = MapsCoordinateParser::parseCoordinates( array_shift( $args ) ); |
128 | | - |
| 128 | + |
129 | 129 | if ( !$markerData ) continue; |
130 | 130 | |
131 | 131 | if ( count( $args ) > 0 ) { |