Google maps services js


#1

How to use https://github.com/googlemaps/google-maps-services-js in expo?

I tried adding @google/maps by yarn, but after building the project it says few libraries like url, util, crypto are not available.
url, util and crypto packages used to come with react-native. but it is not available when using with expo. any idea?


#2

Hi there! url, util, and crypto packages actually never came packaged with react-native, they are node standard library packages. Any node libraries that depend on the node standard library won’t work with react-native or expo. You could give this a try but ultimately you should be using this library on your server, otherwise you are leaking your API key to the users of your app. Keys should be kept secret on the server and not leaked on the client.