- $oGeocode->setRoute($aRoute);
- }
-
- // Search query
- $sQuery = (isset($_GET['q'])?trim($_GET['q']):'');
- if (!$sQuery && isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'][0] == '/')
- {
- $sQuery = substr($_SERVER['PATH_INFO'], 1);
-
- // reverse order of '/' separated string
- $aPhrases = explode('/', $sQuery);
- $aPhrases = array_reverse($aPhrases);
- $sQuery = join(', ',$aPhrases);
- }
- if (!$sQuery)
- {
- $oGeocode->setStructuredQuery(@$_GET['amenity'], @$_GET['street'], @$_GET['city'], @$_GET['county'], @$_GET['state'], @$_GET['country'], @$_GET['postalcode']);
- }
- else
- {
- $oGeocode->setQuery($sQuery);