geoip_distance
- Синтаксис
-
#define SYSTEM_METRIC 0 // kilometers #define SYSTEM_IMPERIAL 1 // statute miles native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC);
Переменная | Описание |
---|---|
lat1 |
The first IP latitude. |
lon1 |
The first IP longitude. |
lat2 |
The second IP latitude. |
lon2 |
The second IP longitude. |
system |
The system of measurement, 0 = Metric(kilometers) or 1 = English(miles). |
- Описание
- Calculate the distance between geographical coordinates, latitude and longitude.
- Пометка
-
This native requires GeoIP City database, which can be retrieved from: http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary)
- Возвращает
- The distance as result in specified system of measurement.