Geo
in package
uses
TraitData, TraitDataWrite, TraitGeoSQL
FinalYes
Table of Contents
Properties
- $data : Data
- $dataResult : array<string|int, mixed>
- $env : array<string|int, mixed>
- $input : Input
- $pageTools : PageTools
Methods
- __construct() : mixed
- fetchLocationCoordinates() : string
- getDataInstance() : Data
- 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
- updateGeoAttributes() : mixed
- pick the geolocation and clean the search from unwanted chars
- 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
- initCoordinates() : string|null
- mapGeoDataToResponse() : array<string|int, mixed>
- writeData() : void
Properties
$data
private
Data
$data
$dataResult
private
array<string|int, mixed>
$dataResult
= ['lat' => 0.0, 'lon' => 0.0, 'geoloc' => '', 'iso_alpha2' => '']
$env
private
array<string|int, mixed>
$env
$input
private
Input
$input
$pageTools
private
PageTools
$pageTools
Methods
__construct()
public
__construct() : mixed
fetchLocationCoordinates()
public
fetchLocationCoordinates(string $term) : string
Parameters
- $term : string
Return values
stringgetDataInstance()
public
getDataInstance() : Data
Return values
DatagetDataWriteInstance()
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>
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 = ''
Return values
array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string} —param string $strLL - lat/lon, separated with comma param int $nLimitOsm
updateGeoAttributes()
pick the geolocation and clean the search from unwanted chars
public
updateGeoAttributes([mixed $saAtt = [] ]) : mixed
Parameters
- $saAtt : mixed = []
getCurlAndLog()
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>
Return values
array{'lat': float, 'lon': float, 'geoloc': string, 'iso_alpha2': string}initCoordinates()
private
initCoordinates() : string|null
Return values
string|nullmapGeoDataToResponse()
private
mapGeoDataToResponse(array<string|int, mixed> $saGeoData, string $strSearch) : array<string|int, mixed>
Parameters
- $saGeoData : array<string|int, mixed>
- $strSearch : string
Return values
array<string|int, mixed>writeData()
private
writeData(string $table, array<string|int, mixed> $data) : void
Parameters
- $table : string
- $data : array<string|int, mixed>