Index: trunk/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php |
— | — | @@ -29,6 +29,15 @@ |
30 | 30 | public function setDataItem( SMWDataItem $dataItem ) { |
31 | 31 | if ( $dataItem->getDIType() == SMWDataItem::TYPE_GEO ) { |
32 | 32 | $this->m_dataitem = $dataItem; |
| 33 | + |
| 34 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 35 | + $this->m_caption = MapsCoordinateParser::formatCoordinates( |
| 36 | + $dataItem->getCoordinateSet(), |
| 37 | + $smgQPCoodFormat, |
| 38 | + $smgQPCoodDirectional |
| 39 | + ); |
| 40 | + |
| 41 | + $this->wikiValue = $this->m_caption; |
33 | 42 | return true; |
34 | 43 | } else { |
35 | 44 | return false; |
— | — | @@ -127,9 +136,7 @@ |
128 | 137 | * @since 0.6 |
129 | 138 | */ |
130 | 139 | protected function parseDBkeys( $args ) { |
131 | | - $this->setDataItem( new SMWDIGeoCoord( array( (float)$args[0], (float)$args[1] ), $this->m_typeid ) ); |
132 | | - $this->m_caption = $this->m_dataitem->getSerialization(); |
133 | | - $this->wikiValue = $this->m_caption; |
| 140 | + $this->setDataItem( new SMWDIGeoCoord( array( 'lat' => (float)$args[0], 'lon' => (float)$args[1] ), $this->m_typeid ) ); |
134 | 141 | } |
135 | 142 | |
136 | 143 | /** |
— | — | @@ -162,6 +169,7 @@ |
163 | 170 | * @since 0.6 |
164 | 171 | */ |
165 | 172 | public function getShortWikiText( $linked = null ) { |
| 173 | + |
166 | 174 | if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) { |
167 | 175 | SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
168 | 176 | |