tentone / geo-three

Tile based geographic world map visualization library for threejs
https://tentone.github.io/geo-three/docs/
MIT License
651 stars 105 forks source link

Google Maps, createSession fails #64

Open cognmbs opened 8 months ago

cognmbs commented 8 months ago

Hello, first I would like to thank you for your work.

(everything working perfect with BingMapsProvider).

I'm having issuse to fetch google maps tiles this is my code: const googleProvider = new Geo.GoogleMapsProvider(GOOGLE_MAPS_API_KEY).

I saw the createSession fails, the google maps API key is valid with tiles enable. Mabye I'm doing something worng? thanks for any help

** according to google maps docs: https://developers.google.com/maps/documentation/tile/roadmap geo three createSession fetch: const address = 'https://www.googleapis.com/tile/v1/createSession?key=' + this.apiToken;

what google shows: "https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY"

curl -X POST -d '{ "mapType": "roadmap", "language": "en-US", "region": "US" }' \ -H 'Content-Type: application/json' \ "https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY"

I think they have change the API address, I succeeded to fetch it from my browser and create session with the new adress

tentone commented 8 months ago

Hello

I have to validate this with my account, its possible that the API has changed in the meanwhile since i created the provider code.