Index: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | 'lat' => $dbKeys[0], |
40 | 40 | 'lon' => $dbKeys[1] |
41 | 41 | ), |
42 | | - $radius |
| 42 | + $radius * 1000 |
43 | 43 | ); |
44 | 44 | } |
45 | 45 | } |
— | — | @@ -89,13 +89,11 @@ |
90 | 90 | * @return An associative array containing the limits with keys north, east, south and west. |
91 | 91 | */ |
92 | 92 | private static function getBoundingBox( array $centerCoordinates, $circleRadius ) { |
93 | | - $centerCoordinates = array('lat' => 0, 'lon' => 0); |
94 | | - var_dump($centerCoordinates); |
95 | 93 | $north = MapsGeoFunctions::findDestination( $centerCoordinates, 0, $circleRadius ); |
96 | 94 | $east = MapsGeoFunctions::findDestination( $centerCoordinates, 90, $circleRadius ); |
97 | 95 | $south = MapsGeoFunctions::findDestination( $centerCoordinates, 180, $circleRadius ); |
98 | 96 | $west = MapsGeoFunctions::findDestination( $centerCoordinates, 270, $circleRadius ); |
99 | | -var_dump($north);var_dump($east);var_dump($south);var_dump($west);exit; |
| 97 | + |
100 | 98 | return array( |
101 | 99 | 'north' => $north['lat'], |
102 | 100 | 'east' => $east['lon'], |
— | — | @@ -127,8 +125,8 @@ |
128 | 126 | // the description is valid, and the near comparator is used. |
129 | 127 | if ( $dataValue->getTypeID() != '_geo' |
130 | 128 | || !$dataValue->isValid() |
131 | | - ) return true; |
132 | | - |
| 129 | + ) return false; |
| 130 | + |
133 | 131 | $boundingBox = $this->getBounds(); |
134 | 132 | |
135 | 133 | $north = $dbs->addQuotes( $boundingBox['north'] ); |
— | — | @@ -143,8 +141,6 @@ |
144 | 142 | $conditions[] = "{$tableName}.{$fieldNames[1]} < $east"; |
145 | 143 | $conditions[] = "{$tableName}.{$fieldNames[1]} > $west"; |
146 | 144 | |
147 | | - $whereSQL .= implode( ' && ', $conditions ); |
148 | | - |
149 | | - return true; |
| 145 | + return implode( ' && ', $conditions ); |
150 | 146 | } |
151 | 147 | } |
\ No newline at end of file |