OK, so I would first decide if you really need parseCatalog. I'm sure you don't. You may use sql joins to load additional information about referenced tables.
My run function would look something like this:
Code:
public function run($NELat, $SWLat, $NELng, $SWLng)
{
$this->import('String');
$this->import('Database');
$query = "SELECT * FROM catl_properties WHERE prop_latitude BETWEEN ? AND ? AND prop_longitude BETWEEN ? AND ?";
$objResults = $this->Database->prepare($query)->execute($NELat, $SWLat, $NELng, $SWLng);
echo json_encode($objResults->fetchAllAssoc());
}
Simple
OK now about sql joins, it works something like this:
Code:
$query = "SELECT catl_properties.*, tl_taxonomy.alias, tl_taxonomy.name FROM catl_properties LEFT JOIN tl_taxonomy ON catl_properties.prop_type = tl_taxonomy.id WHERE ..."
This left join takes all columns from catl_properties plus alias and name columns from tl_taxonomy table. Row of tl_taxonomy table is selected so that its id matches prop_type in catl_properties table. This is pretty much what you need. If you don't know how to use sql joins, make sure you take time to learn that This way it's much faster than using parseCatalog.
But if you feel you need parseCatalog, just add empty compile function to your MapBounds class. I'm not sure if it works then, because there is complex initialization required, but you may give it a try.
Bookmarks