Algolia React instantsearch Map Zoom

Viewed 19

With React InstantSearch, I can’t seem to reach the map object to manipulate it.

The goal is to accomplish what this fiddle is demo’ing (the zoom in, zoom out functionnality):

https://jsfiddle.net/vh3s88mc/15/

i've tried to access it via the prototype but it doesn't seems to work ;

const map = window.google.maps.Map
map.prototype.setZoom(10) 

i've also tried to use React.createRef() on the GeoSearch to access map but same result ;

const map = mapRef.current.props.google.maps.Map
const map = mapRef.current.props.google.maps.Map
0 Answers
Related