Geo
in package
uses
TraitCountry, TraitDataWrite, TraitGeoSQL
Table of Contents
Properties
- $dataResult : array<string|int, mixed>
- $dataWrite : DataWrite
- $env : array<string|int, mixed>
- $geoSQL : GeoSQL
- $input : Input
Methods
- __construct() : mixed
- cleanLatLonAtt() : array<string|int, mixed>
- fetchLocationCoordinates() : string
- getCountryInstance() : Country
- getDataWriteInstance() : DataWrite
- getGeoLocAtt() : array<string|int, mixed>
- Holt GeoLoc, gibt saAtt zurück und nutzt Session
- getGeoSQLInstance() : GeoSQL
- getOSM() : array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}
- Via curl wird auf OSM lon/lat abgefragt
- initCoordinates() : string|null
- updateGeoAttributes() : mixed
- pick the geolocation and clean the search from unwanted chars
- formatLatLonForQuery() : string
- getCurlAndLog() : bool|string
- getGeoDataByLatLon() : array<string|int, mixed>
- getGeoDataByName() : array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}
- getGeoID() : int
- Try to get the Geo ID
- getGeoIDByLatLon() : array<string|int, mixed>
- getGeoIDBySearch() : array<string|int, mixed>
- getOsmData() : array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}
- open mapquestapi.com and get results
- mapGeoDataToResponse() : array<string|int, mixed>
Properties
$dataResult
private
array<string|int, mixed>
$dataResult
= ['lat' => 0.0, 'lon' => 0.0, 'geoloc' => '', 'iso_alpha2' => '']
$dataWrite
private
DataWrite
$dataWrite
$env
private
array<string|int, mixed>
$env
$geoSQL
private
GeoSQL
$geoSQL
$input
private
Input
$input
Methods
__construct()
public
__construct() : mixed
cleanLatLonAtt()
public
cleanLatLonAtt([array<string|int, mixed> $saAtt = [] ]) : array<string|int, mixed>
Parameters
- $saAtt : array<string|int, mixed> = []
Return values
array<string|int, mixed>fetchLocationCoordinates()
public
fetchLocationCoordinates(string $term) : string
Parameters
- $term : string
Tags
Return values
stringgetCountryInstance()
public
getCountryInstance() : Country
Return values
CountrygetDataWriteInstance()
public
getDataWriteInstance() : DataWrite
Return values
DataWritegetGeoLocAtt()
Holt GeoLoc, gibt saAtt zurück und nutzt Session
public
getGeoLocAtt(array<string|int, mixed> $saAtt) : array<string|int, mixed>
Parameters
- $saAtt : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getGeoSQLInstance()
public
getGeoSQLInstance() : GeoSQL
Return values
GeoSQLgetOSM()
Via curl wird auf OSM lon/lat abgefragt
public
getOSM([string $strSearch = '' ][, string $strLatLon = '' ]) : array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}
http://wiki.openstreetmap.org/wiki/User:SunCobalt/OpenLayers_Suche#Download_Beispieldateien
Die Funktion speichert seit 23.05.2013 geoloc-daten in tabelle data_geo_loc Wenn nach städten oder lat/lon gesucht wird, wird lokale tabelle gelesen
Parameters
- $strSearch : string = ''
-
- plz oder ort
- $strLatLon : string = ''
Tags
Return values
array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string} —param string $strLL - lat/lon, separated with comma param int $nLimitOsm
initCoordinates()
public
initCoordinates() : string|null
Return values
string|nullupdateGeoAttributes()
pick the geolocation and clean the search from unwanted chars
public
updateGeoAttributes([mixed $saAtt = [] ]) : mixed
Parameters
- $saAtt : mixed = []
formatLatLonForQuery()
private
formatLatLonForQuery(string $strLatLon[, bool $isShort = true ]) : string
Parameters
- $strLatLon : string
- $isShort : bool = true
Return values
stringgetCurlAndLog()
private
getCurlAndLog(array<string|int, mixed> $saLog, string $url) : bool|string
Parameters
- $saLog : array<string|int, mixed>
- $url : string
Return values
bool|stringgetGeoDataByLatLon()
private
getGeoDataByLatLon(string $strLatLon) : array<string|int, mixed>
Parameters
- $strLatLon : string
Return values
array<string|int, mixed>getGeoDataByName()
private
getGeoDataByName(mixed $strSearch) : array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}
Parameters
- $strSearch : mixed
Return values
array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}getGeoID()
Try to get the Geo ID
private
getGeoID(string $strSearch) : int
Parameters
- $strSearch : string
Return values
intgetGeoIDByLatLon()
private
getGeoIDByLatLon(string $strLatLon) : array<string|int, mixed>
Parameters
- $strLatLon : string
Return values
array<string|int, mixed>getGeoIDBySearch()
private
getGeoIDBySearch(string $strSearch) : array<string|int, mixed>
Parameters
- $strSearch : string
Return values
array<string|int, mixed>getOsmData()
open mapquestapi.com and get results
private
getOsmData(string $strSearch, array<string|int, mixed> $naLatLon) : array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}
Parameters
- $strSearch : string
- $naLatLon : array<string|int, mixed>
Tags
Return values
array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}mapGeoDataToResponse()
private
mapGeoDataToResponse(array<string|int, mixed> $saGeoData, mixed $strSearch) : array<string|int, mixed>
Parameters
- $saGeoData : array<string|int, mixed>
- $strSearch : mixed