2 $aFilteredPlaces = array();
3 foreach($aSearchResults as $iResNum => $aPointDetails)
6 'place_id'=>$aPointDetails['place_id'],
7 'licence'=>"Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0.",
10 $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':'')));
13 $aPlace['osm_type'] = $sOSMType;
14 $aPlace['osm_id'] = $aPointDetails['osm_id'];
17 if (isset($aPointDetails['aBoundingBox']))
19 $aPlace['boundingbox'] = array(
20 $aPointDetails['aBoundingBox'][0],
21 $aPointDetails['aBoundingBox'][1],
22 $aPointDetails['aBoundingBox'][2],
23 $aPointDetails['aBoundingBox'][3]);
25 if (isset($aPointDetails['aPolyPoints']) && $bShowPolygons)
27 $aPlace['polygonpoints'] = $aPointDetails['aPolyPoints'];
31 if (isset($aPointDetails['zoom']))
33 $aPlace['zoom'] = $aPointDetails['zoom'];
36 $aPlace['lat'] = $aPointDetails['lat'];
37 $aPlace['lon'] = $aPointDetails['lon'];
38 $aPlace['display_name'] = $aPointDetails['name'];
40 $aPlace['category'] = $aPointDetails['class'];
41 $aPlace['type'] = $aPointDetails['type'];
42 if ($aPointDetails['icon'])
44 $aPlace['icon'] = $aPointDetails['icon'];
47 if (isset($aPointDetails['address']))
49 $aPlace['address'] = $aPointDetails['address'];
52 $aFilteredPlaces[] = $aPlace;
55 javascript_renderData($aFilteredPlaces);