Index: trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php |
— | — | @@ -79,14 +79,15 @@ |
80 | 80 | */ |
81 | 81 | public function getQueryDescription( $value ) { |
82 | 82 | // TODO |
| 83 | + return parent::getQueryDescription( $value ); |
83 | 84 | } |
84 | 85 | |
85 | 86 | /** |
86 | 87 | * @see SMWDataValue::parseDBkeys |
87 | 88 | */ |
88 | 89 | protected function parseDBkeys( $args ) { |
89 | | - $this->mCoordinateSet['lat'] = $args[0]; |
90 | | - $this->mCoordinateSet['lon'] = $args[1]; |
| 90 | + $this->mCoordinateSet['lat'] = $args['lat']; |
| 91 | + $this->mCoordinateSet['lon'] = $args['lon']; |
91 | 92 | |
92 | 93 | $this->m_caption = MapsCoordinateParser::formatCoordinates( $this->mCoordinateSet ); |
93 | 94 | $this->mWikivalue = $this->m_caption; |
— | — | @@ -97,8 +98,19 @@ |
98 | 99 | */ |
99 | 100 | public function getDBkeys() { |
100 | 101 | $this->unstub(); |
101 | | - return array( $this->mCoordinateSet['lat'], $this->mCoordinateSet['lon'] ); |
| 102 | + |
| 103 | + return array( |
| 104 | + 'lat' => $this->mCoordinateSet['lat'], |
| 105 | + 'lon' => $this->mCoordinateSet['lon'] |
| 106 | + ); |
102 | 107 | } |
| 108 | + |
| 109 | + /** |
| 110 | + * @see SMWDataValue::getSignature |
| 111 | + */ |
| 112 | + public function getSignature() { |
| 113 | + return 'ff'; |
| 114 | + } |
103 | 115 | |
104 | 116 | /** |
105 | 117 | * @see SMWDataValue::getShortWikiText |
Index: trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoords.php |
— | — | @@ -60,6 +60,9 @@ |
61 | 61 | $south = $dbs->addQuotes( $boundingBox['south'] ); |
62 | 62 | $west = $dbs->addQuotes( $boundingBox['west'] ); |
63 | 63 | |
| 64 | + // TODO: The field names are hardcoded in, since SMW offers no support for selection based on multiple fields. |
| 65 | + // Ideally SMW's setup should be changed to allow for this. Now the query can break when other extensions |
| 66 | + // add their own semantic tables with similar signatures. |
64 | 67 | $whereSQL .= "{$tablename}.lat < $north && {$tablename}.lat > $south && {$tablename}.lon < $east && {$tablename}.lon > $west"; |
65 | 68 | |
66 | 69 | return true; |
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_QueryPrinters.php |
— | — | @@ -170,5 +170,4 @@ |
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
174 | | - |
175 | 174 | } |
\ No newline at end of file |