API Reference
map2map
Kind: global class
- map2map
- new map2map()
- instance
- .identifyMap(url) ⇒
String | Number
- .yandexMapsToCoord(url) ⇒
Promise
- .googleMapsToCoord(url) ⇒
Promise
- .twoGisMapsToCoord(url) ⇒
Promise
- .appleMapsToCoord(url) ⇒
Object
- .telegramLocationToCoord(msg) ⇒
Object
- .coordToYandexMaps(coord) ⇒
String
- .coordToTwoGisMaps(coord) ⇒
String
- .coordToGoogleMaps(coord) ⇒
String
- .coordToAppleMaps(coord) ⇒
String
- .coordToTelegramLocation(coord, chat_id, bot, bot_type)
- .identifyMap(url) ⇒
Specifies the type of geolocation link(google/yandex/2gis/apple).
Kind: instance method of map2map
Returns: String | Number
- If the geolocation link falls under one of the 4 types, returns the type, otherwise it will return -1.
Param | Type | Description |
---|---|---|
url | String |
The geolocation link. |
Translates a link to a Yandex Maps geolocation into coordinates.
Kind: instance method of map2map
Returns: Promise
- Returns a Object
. This object has lat
and long
(latitude and longitude) properties. On error, properties are equal to err
.
Note: Use no more than 1 time per second, otherwise captcha may work.
Param | Type | Description |
---|---|---|
url | String |
The link to a Yandex Maps. |
Translates a link to a Google Maps geolocation into coordinates.
Kind: instance method of map2map
Returns: Promise
- Returns a Object
. This object has lat
and long
(latitude and longitude) properties. On error, properties are equal to err
.
Note: Use no more than 1 time per second, otherwise captcha may work.
Param | Type | Description |
---|---|---|
url | String |
The link to a Google Maps. |
Translates a link to a 2Gis Maps geolocation into coordinates.
Kind: instance method of map2map
Returns: Promise
- Returns a Object
. This object has lat
and long
(latitude and longitude) properties. On error, properties are equal to err
.
Param | Type | Description |
---|---|---|
url | String |
The link to a 2Gis Maps. |
Translates a link to a Apple Maps geolocation into coordinates.
Kind: instance method of map2map
Returns: Object
. This object has lat
and long
(latitude and longitude) properties. On error, properties are equal to err
.
Param | Type | Description |
---|---|---|
url | String |
The link to a Apple Maps. |
Translates a Telegram location into coordinates.
Kind: instance method of map2map
Returns: Object
. This object has lat
and long
(latitude and longitude) properties. On error, properties are equal to err
.
Param | Type | Description |
---|---|---|
msg | Object |
https://core.telegram.org/bots/api#message |
Translates coordinates into a link to a Yandex Maps.
Kind: instance method of map2map
Returns: String
. The link to a Yandex Maps.
Param | Type | Description |
---|---|---|
coord | Object |
lat and long (latitude and longitude) properties |
Translates coordinates into a link to a 2Gis Maps.
Kind: instance method of map2map
Returns: String
. The link to a 2Gis Maps.
Param | Type | Description |
---|---|---|
coord | Object |
lat and long (latitude and longitude) properties |
Translates coordinates into a link to a Google Maps.
Kind: instance method of map2map
Returns: String
. The link to a Google Maps.
Param | Type | Description |
---|---|---|
coord | Object |
lat and long (latitude and longitude) properties |
Translates coordinates into a link to a Apple Maps.
Kind: instance method of map2map
Returns: String
. The link to a Apple Maps.
Param | Type | Description |
---|---|---|
coord | Object |
lat and long (latitude and longitude) properties |
Translates coordinates into a Telegram location.
Kind: instance method of map2map
Returns: String
. The link to a Apple Maps.
Param | Type | Description |
---|---|---|
coord | Object |
lat and long (latitude and longitude) properties |
chat_id | String |
Unique identifier for this Telegram chat |
bot | TelegramBot |
TelegramBot class instance (Telegraf/Telebot/node-telegram-bot-api) |
bot_type | String |
Telegram bot library. |