Alternative to Google maps API

Use this forum to find or post TSRE tips & guides.
Manuel18
Posts: 5
Joined: 12 Feb 2019, 01:15
Hello everybody.

Since Google maps API key got an expensive cost than i can't afford. I figure out a solution to this.

Mapbox
Mapbox provide not just a vector street map also an satellital images.
www.Mapbox.com

1.- Register and obtain your API KEY or Access Token

2.- Once obtained your API KEY, open settings.txt and alter (imageMapsURL) line with the following code:

Code: Select all

imageMapsUrl = https://api.mapbox.com/styles/v1/mapbox/satellite-v9/static/{lon},{lat},zoom/{res}x{res}?access_token=+YOUR_MAPBOX_ACCESS_TOKEN
Where zoom parameter need to be added manually and has the following values

Standard Terrain
Raster Image Z18 equal to : 17
Raster Image Z17 equal to : 16

Distance Terrain
Raster Image Z18 equal to : 13
Raster Image Z17 equal to : 12

EXAMPLE using Standard Terrain with a Raster image Z17

Code: Select all

imageMapsUrl = https://api.mapbox.com/styles/v1/mapbox/satellite-v9/static/{lon},{lat},16/{res}x{res}?access_token=+YOUR_MAPBOX_ACCESS_TOKEN
(special thanks to CosmigonoN)

Regards.
Manuel
Last edited by Manuel18 on 11 Feb 2024, 02:59, edited 3 times in total.

xavivilla
Posts: 28
Joined: 16 Jan 2019, 19:14
Thank you very much for the Google alternative

To make it easier to see the code to enter in settings.txt

Code: Select all

imageMapsUrl = http://api.mapbox.com/v4/mapbox.satellite/{lon},{lat},{zoom}/{res}x{res}.png?access_token=INSERT_YOUR_API_KEY_HERE
I apologize for my English of translator

hannes44
Posts: 29
Joined: 27 Jan 2019, 14:23
Thank you, that helps!

User avatar
Goku
Site Admin
Posts: 363
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
Thanks. That is an awesome help for route builders.

kiwikid
Posts: 4
Joined: 16 Jan 2019, 17:33
That's brilliant, thanks a lot.
Mike

OldVern
Posts: 19
Joined: 18 Feb 2019, 21:19
Nice find, Manuel.

User avatar
VAPOR3D
Posts: 13
Joined: 31 May 2020, 02:30
Hey,

I can't get this to work. What is the format of the data to be entered between the brackets of {lon},{lat},{zoom}/{res}x{res}?

Thanks.

User avatar
VAPOR3D
Posts: 13
Joined: 31 May 2020, 02:30
Well, I've learned how it works, thanks anyway!

a408814361
Posts: 4
Joined: 17 Nov 2020, 06:06
Can you tall me how to work ? thankyou.

User avatar
Switch Tender
Posts: 37
Joined: 17 Jan 2019, 01:58
The first post in this thread is pretty self explanatory.
What part of it are you having problems with?

Post Reply