Function __global->geocode
Definitions
sources/locations_geocoding.php
- Geocode a written location.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $location | string | No | No | required parameter | N/A | N/A | Written location |
| &$errormsg | ?Tempcode | Yes | No | Null | N/A | N/A | Error message (returned by reference) (null: not set yet) |
| $service | ?string | No | No | Null | google bing mapquest | N/A | Force geocoding through a particular service (null: not enforced) |
Returns
- A pair: Latitude, Longitude (null: error)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Geocode a written location.
*
* @param string $location Written location
* @param ?Tempcode $errormsg Error message (returned by reference) (null: not set yet)
* @param ?string $service Force geocoding through a particular service (null: not enforced)
* @set google bing mapquest
* @return ?array A pair: Latitude, Longitude (null: error)
*/
function geocode(string $location, ?object &$errormsg = null, ?string $service = null) : ?array
* Geocode a written location.
*
* @param string $location Written location
* @param ?Tempcode $errormsg Error message (returned by reference) (null: not set yet)
* @param ?string $service Force geocoding through a particular service (null: not enforced)
* @set google bing mapquest
* @return ?array A pair: Latitude, Longitude (null: error)
*/
function geocode(string $location, ?object &$errormsg = null, ?string $service = null) : ?array

