3 $aFilteredPlaces = array();
8 $aFilteredPlaces['error'] = $sError;
10 $aFilteredPlaces['error'] = 'Unable to geocode';
14 if ($aPlace['place_id']) $aFilteredPlaces['place_id'] = $aPlace['place_id'];
15 $aFilteredPlaces['licence'] = "Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright";
16 $sOSMType = formatOSMType($aPlace['osm_type']);
19 $aFilteredPlaces['osm_type'] = $sOSMType;
20 $aFilteredPlaces['osm_id'] = $aPlace['osm_id'];
22 if (isset($aPlace['lat'])) $aFilteredPlaces['lat'] = $aPlace['lat'];
23 if (isset($aPlace['lon'])) $aFilteredPlaces['lon'] = $aPlace['lon'];
25 $aFilteredPlaces['place_rank'] = $aPlace['rank_search'];
27 $aFilteredPlaces['category'] = $aPlace['class'];
28 $aFilteredPlaces['type'] = $aPlace['type'];
30 $aFilteredPlaces['importance'] = $aPlace['importance'];
32 $aFilteredPlaces['addresstype'] = strtolower($aPlace['addresstype']);
34 $aFilteredPlaces['display_name'] = $aPlace['langaddress'];
35 $aFilteredPlaces['name'] = $aPlace['placename'];
37 if (isset($aPlace['aAddress'])) $aFilteredPlaces['address'] = $aPlace['aAddress'];
38 if (isset($aPlace['sExtraTags'])) $aFilteredPlaces['extratags'] = $aPlace['sExtraTags'];
39 if (isset($aPlace['sNameDetails'])) $aFilteredPlaces['namedetails'] = $aPlace['sNameDetails'];
41 if (isset($aPlace['aBoundingBox']))
43 $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
46 if (isset($aPlace['asgeojson']))
48 $aFilteredPlaces['geojson'] = json_decode($aPlace['asgeojson']);
51 if (isset($aPlace['assvg']))
53 $aFilteredPlaces['svg'] = $aPlace['assvg'];
56 if (isset($aPlace['astext']))
58 $aFilteredPlaces['geotext'] = $aPlace['astext'];
61 if (isset($aPlace['askml']))
63 $aFilteredPlaces['geokml'] = $aPlace['askml'];
68 javascript_renderData($aFilteredPlaces);