0👍
I think you would be better served using the Google Maps client-side Distance Matrix Service.
I think that direct calls to the distancematrix endpoint are only allowed in server-side code.
See the answer here as I believe it may apply to the issue you are seeing:
Google Distance Matrix API returning CORS blockade
0👍
As CORS
is a client side restriction, I believe that this api should be used by the server side. So the right way it to use API that designed for client side. Alternatively you can expose an API in your server that use that API, then call it from the client side.
- [Vuejs]-How do I combine refs in Vue.js with a ternary expression?
- [Vuejs]-How to disabled Phusion Passenger for hosting on Plesk? When I refresh web app in VueJS I always have error
Source:stackexchange.com