Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Fix query with record type coordinates #102

Merged
merged 1 commit into from
Aug 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/queryprinters/SM_QueryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,18 @@ protected function handleResultRow( array $row ) {
$dataItem = $dataValue->getDataItem();
$polyHandler = new PolygonHandler ( $dataItem->getString() );
$this->geoShapes[ $polyHandler->getGeoType() ][] = $polyHandler->shapeFromText();
} else if ( strpos( $dataValue->getTypeID(), '_rec' ) !== false ) {
foreach ( $dataValue->getDataItems() as $dataItem ) {
if ( $dataItem instanceof \SMWDIGeoCoord ) {
$location = Location::newFromLatLon( $dataItem->getLatitude(), $dataItem->getLongitude() );
$locations[] = $location;
}
}
}
else if ( $dataValue->getTypeID() != '_geo' && $i != 0 && !$this->isHeadersHide()) {
$properties[] = $this->handleResultProperty( $dataValue, $printRequest );
}
else if ( $printRequest->getMode() == SMWPrintRequest::PRINT_PROP && $printRequest->getTypeID() == '_geo' ) {
else if ( $printRequest->getMode() == SMWPrintRequest::PRINT_PROP && $printRequest->getTypeID() == '_geo' || $dataValue->getTypeID() == '_geo' ) {
$dataItem = $dataValue->getDataItem();

$location = Location::newFromLatLon( $dataItem->getLatitude(), $dataItem->getLongitude() );
Expand Down