Skip to content

Commit 3b61309

Browse files
committed
feat(README): update readme with useMAxZoomService hook
1 parent e1b3a7e commit 3b61309

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,38 @@ Returns the [`PlacesService`](google.maps.places.PlacesService) class to use dir
479479
google.maps.places.PlacesService
480480
```
481481

482+
### useMaxZoomService
483+
484+
React hook to use the [Maximum Zoom Imagery Service](https://developers.google.com/maps/documentation/javascript/maxzoom) in any component.
485+
486+
#### Usage
487+
488+
```jsx
489+
import React from 'react';
490+
import {useMaxZoomService} from '@ubilabs/google-maps-react-hooks';
491+
492+
const MyComponent = () => {
493+
const maxZoomService = useMaxZoomService();
494+
495+
maxZoomService.getMaxZoomAtLatLng(
496+
LatLng,
497+
(result: google.maps.MaxZoomResult) => {
498+
// Do something with result
499+
}
500+
);
501+
502+
return (...);
503+
};
504+
```
505+
506+
#### Return value
507+
508+
Returns the [`MaxZoomService`](google.maps.places.MaxZoomService) class to use directly.
509+
510+
```TypeScript
511+
google.maps.places.MaxZoomService
512+
```
513+
482514
## Publish (only for maintainers)
483515

484516
`npm publish --access public`

0 commit comments

Comments
 (0)