API

This documentation is generated from PHPDOC.



Class: ahmaphelper

Methoden verstecken

 __constructpublic __construct()

constructor
@return bool

 _isValidPositionSetprivate _isValidPositionSet( $sProvider, $lat, $lon, $zoomlevel) ... all param(s) required

helper function for generateUrl(): check parameters for position and zoom
it returns true/ false
@see getProviders() to get a list of known providers

@param string $sProvider provider of a map website
@param float $lat position - latitude
@param float $lon position - longitude
@param float $zoomlevel zoomlevel
@return string

 _isStrictPositionSetprivate _isStrictPositionSet( $sProvider, $lat, $lon, $zoomlevel) ... all param(s) required

helper function for generateUrl(): check parameters if they fit strict
requirements for a provider.
it returns true/ false
@see getProviders() to get a list of known providers

@param string $sProvider provider of a map website
@param float $lat position - latitude
@param float $lon position - longitude
@param float $zoomlevel zoomlevel
@return string

 fixPositionpublic fixPosition()

fix positition data to compatible values that match all providers
@return type

 getMinZoompublic getMinZoom()

get minimal zoom level of all providers
@return float or int

 getPospublic getPos( $sUrl) ... all param(s) required

get a position by parsing a url. It returns an array with the keys
- source - given url
- provider - name of the provider that matches the url
- lat, lon - position
- zoom - zoom level
It returns false if an url was not detected as a map url of any of the
known map providers

@param string $sUrl
@return array

 getProviderspublic getProviders()

get a flat array for a list of known map providers
@return array

 generateUrlpublic generateUrl( $sProvider, $lat = 0, $lon = 0, $zoomlevel = false) ... 1 of 4 param(s) required

generate an url to a map with a given position
@see getProviders() to get a list of known providers

@param string $sProvider provider of a map website
@param float $lat position - latitude
@param float $lon position - longitude
@param float $zoomlevel zoomlevel
@return string

 generateUrlspublic generateUrls( $lat = 0, $lon = 0, $zoomlevel = false)

get a list with links to a given position position with all map providers

@param float $lat position - latitude
@param float $lon position - longitude
@param float $zoomlevel zoomlevel
@return array

 getUrlspublic getUrls()

get a list with links to a given position position with all map providers
call this function after method getPos() that fetches the position from
an url
@see getPos()

@return array

Properties verstecken

$_aPatternsprotected $_aPatterns = false
$_aPositionprotected $_aPosition = false






Copyright © 2020 Axel Hahn
project page: GitHub (en)
Axels Webseite (de)
results will be here