2 $aFilteredPlaces = array();
7 $aFilteredPlaces['error'] = $sError;
9 $aFilteredPlaces['error'] = 'Unable to geocode';
13 if (isset($aPlace['place_id'])) $aFilteredPlaces['place_id'] = $aPlace['place_id'];
14 $aFilteredPlaces['licence'] = "Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright";
15 $sOSMType = ($aPlace['osm_type'] == 'N'?'node':($aPlace['osm_type'] == 'W'?'way':($aPlace['osm_type'] == 'R'?'relation':
16 ($aPlace['osm_type'] == 'T'?'tiger':($aPlace['osm_type'] == 'I'?'interpolation':'')))));
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'];
24 $aFilteredPlaces['display_name'] = $aPlace['langaddress'];
25 if (isset($aPlace['aAddress'])) $aFilteredPlaces['address'] = $aPlace['aAddress'];
26 if (isset($aPlace['sExtraTags'])) $aFilteredPlaces['extratags'] = $aPlace['sExtraTags'];
27 if (isset($aPlace['sNameDetails'])) $aFilteredPlaces['namedetails'] = $aPlace['sNameDetails'];
29 if (isset($aPlace['aBoundingBox']))
31 $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
33 if (isset($aPlace['aPolyPoints']) && $bAsPoints)
35 $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
39 if (isset($aPlace['asgeojson']))
41 $aFilteredPlaces['geojson'] = json_decode($aPlace['asgeojson']);
44 if (isset($aPlace['assvg']))
46 $aFilteredPlaces['svg'] = $aPlace['assvg'];
49 if (isset($aPlace['astext']))
51 $aFilteredPlaces['geotext'] = $aPlace['astext'];
54 if (isset($aPlace['askml']))
56 $aFilteredPlaces['geokml'] = $aPlace['askml'];
62 javascript_renderData($aFilteredPlaces);