|
|
@@ -1426,24 +1426,17 @@ class TableAjaxMapWfsAction {
|
|
|
18.614273071289062 54.33634445792519
|
|
|
18.614273071289062 54.33614429135817
|
|
|
*/
|
|
|
- Lib::loadClass('Data_Source');
|
|
|
- $dataSource = new Data_Source($this->_acl->getDB());
|
|
|
- $dataSource->setTable($this->_acl->getName());
|
|
|
- $dataSource->addCol('ID');
|
|
|
- $dataSource->addCol('the_geom');
|
|
|
- $dataSource->setColTypes($this->_acl->getTypes());
|
|
|
-
|
|
|
$params = array();
|
|
|
$params['limit'] = 10000;
|
|
|
if (!empty($args['BBOX'])) {
|
|
|
$params['f_the_geom'] = 'BBOX:' . implode(',', $args['BBOX']);
|
|
|
}
|
|
|
- $items = $dataSource->getItems($params);
|
|
|
+ $items = $this->_acl->buildQuery($params)->getItems();
|
|
|
|
|
|
$buildingsGml = array();
|
|
|
- foreach ($items as $r) {
|
|
|
- if (!empty($r->the_geom)) {
|
|
|
- $buildingsGml[$r->ID] = $this->generateGmlFromWKT($r->the_geom);
|
|
|
+ foreach ($items as $item) {
|
|
|
+ if (!empty( $item['the_geom'] )) {
|
|
|
+ $buildingsGml[ $item['@primaryKey'] ] = $this->generateGmlFromWKT( $item['the_geom'] );
|
|
|
}
|
|
|
}
|
|
|
|