React hook to use the Maximum Zoom Imagery Service in any component.
import React, {useEffect} from 'react';
import {useMaxZoomService} from '@ubilabs/google-maps-react-hooks';
const MyComponent = () => {
const maxZoomService = useMaxZoomService();
const location = /** google.maps.LatLng */;
useEffect(() => {
maxZoomService?.getMaxZoomAtLatLng(
location,
(result: google.maps.MaxZoomResult) => {
// Do something with result
}
);
}, [location]);
return (...);
};
Returns a Max Zoom Service
instance to use directly.
google.maps.MaxZoomService