A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://visgl.github.io/react-google-maps/docs/api-reference/hooks/use-maps-library below:

useMapsLibrary Hook | React Google Maps

React hook to get access to the different Maps JavaScript API libraries. This is essentially a react-version of the google.maps.importLibrary function.

const MyComponent = () => {
const map = useMap();
const placesLib = useMapsLibrary('places');

useEffect(() => {
if (!placesLib || !map) return;

const svc = new placesLib.PlacesService(map);

}, [placesLib, map]);


};


const App = () => (
<APIProvider apiKey={}>
{}
<MyComponent />
</APIProvider>
);

Returns the library object as it is returned by google.maps.importLibrary.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4