SASGIS

Веб-картография и навигация

RapidAPI

English- or other language speakers welcome here
Please do not translate your native language to "broken Russian" via crappy machine translation services - please post it as it is, in your native language.

Модератор: Tolik

RapidAPI

Сообщение Polak » 18 авг 2020, 05:20

Please forgive me if what I am asking here is basic stuff. I am a beginner in SASPlanet and wanted to add to the service this OSM Map:
https://www.osmap.asia/#16/42.7296/121.7824

Need some guidance how to do it.
Thank you for your kind help!
Polak
Новичок
 
Сообщения: 5
Зарегистрирован: 18 авг 2020, 05:14
Благодарил (а): 0 раз.
Поблагодарили: 1 раз.

Re: OpenStreetMap

Сообщение osmap » 18 авг 2020, 11:43

@Polak:

you will need an apikey from RapidAPI for that. Sign up at https://rapidapi.com/MapTilesApi/api/maptiles and than use:

https://maptiles.p.rapidapi.com/en/map/v1/{z}/{x}/{y}.png?rapidapi-key=<Your-API-Key-From-RapidAPI>

as BaseLayer in the application.
osmap
Новичок
 
Сообщения: 2
Зарегистрирован: 19 авг 2020, 12:58
Благодарил (а): 0 раз.
Поблагодарили: 0 раз.

Re: OpenStreetMap

Сообщение Polak » 18 авг 2020, 13:18

Thank you. I signed up, got API key
I see GET MapTiles with English Labels on the left
I see some code snipets on the right

How do I use it all in SASPlanet to change the language of the labels in MAPNIK to english?
Polak
Новичок
 
Сообщения: 5
Зарегистрирован: 18 авг 2020, 05:14
Благодарил (а): 0 раз.
Поблагодарили: 1 раз.

Re: OpenStreetMap

Сообщение Polak » 18 авг 2020, 23:25

Their purpose is clear- spam of that RapidApi. But except for fast filing Spam section of my email no other kind of harm has been done. You may feel differently as someone clearly has impersonated you here.

I am still very much in need to solve and seek help to my original question:
Please forgive me if what I am asking here is basic stuff. I am a beginner in SASPlanet and wanted to add to the service this OSM Map in my SASPlanet application:
https://www.osmap.asia/#16/42.7296/121.7824

Need some guidance how to do it. Thank you for your kind help!

Thanks!
Polak
Новичок
 
Сообщения: 5
Зарегистрирован: 18 авг 2020, 05:14
Благодарил (а): 0 раз.
Поблагодарили: 1 раз.

Re: OpenStreetMap

Сообщение osmap » 19 авг 2020, 14:44

@Polak: this was not intented as spam at all but as a way of helping you in getting access to the map as used at osmap.asia.
@Polak: This is what you have to do to add the map to SAS.Planet:
Go to the SAS.planet Folder, than Maps, than _osm.
Create a new folder osmap.zmp with those two files:

Params.txt:
Код: Выделить всё
[PARAMS]
pnum=115
GUID={D64B56B5-4B72-4EB1-8552-3E211A7A3580}
ParentSubMenu_ru=Туристические
ParentSubMenu_uk=Туристичний
ParentSubMenu=City
name=OSM_English
NameInCache=osm_english
DefURLBase=https://maptiles.p.rapidapi.com/en/map/v1
ContentType=image/png
Ext=.png
projection=1
sradiusa=6378137
sradiusb=6356752
DefHotKey=48
RequestHead=User-Agent: SAS.Planet
IteratorSubRectSize=8,8
License=© OpenStreetMap contributors.


and

GetUrlScript.txt:

Код: Выделить всё
begin
ResultURL:='https://maptiles.p.rapidapi.com/en/map/v1/'+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'.png?rapidapi-key=YOUR-Key-from-RapidAPI';
end.


where you have to replace
Код: Выделить всё
YOUR-Key-from-RapidAPI
with the one you'll find at https://rapidapi.com/developer.

Then restart SAS.planet and from the Maps menu choose City -> OSM_english and as data source choose internet.
osmap
Новичок
 
Сообщения: 2
Зарегистрирован: 19 авг 2020, 12:58
Благодарил (а): 0 раз.
Поблагодарили: 0 раз.

Re: RapidAPI

Сообщение Polak » 19 авг 2020, 20:56

It worked perfectly.
Milion thanks and sorry for all that previous mess with posts.
Thanks again for your help!
Polak
Новичок
 
Сообщения: 5
Зарегистрирован: 18 авг 2020, 05:14
Благодарил (а): 0 раз.
Поблагодарили: 1 раз.


Вернуться в International visitors section

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1

cron