DEV Community

Discussion on: How I wrote my own React wrapper for Google Map

Collapse
 
rainbow_shout profile image
Rainbow Shout

Great little wrapper for Google Maps - only problem I've run into is activating the InfoWindow on Marker click - am I missing something obvious here?

Thanks,

James

Collapse
 
lucifer1004 profile image
Gabriel Wu

Hi James, here is an example of InteractiveMarker.

Collapse
 
rainbow_shout profile image
Rainbow Shout

Amazing, thanks Gabriel :)

I'd actually made something slightly different - an iterator that creates the InfoWindows and their anchor positions, and then an onClick for each marker that passes out the marker ID as an action to a Redux store, changing the relevant infoWindow's visibility.

Really enjoying working with your library!

Collapse
 
rainbow_shout profile image
Rainbow Shout

Actually, there was one other thing - is there a list of event handlers for each component?

For example, I can set an onClick handler on Mapbox and that deals with any click events on the map itself - are there handlers for onLoad, onZoomChange, etc?

Many thanks, James

Thread Thread
 
lucifer1004 profile image
Gabriel Wu

See PROPS & METHODS section for each component in the documentation.

Thread Thread
 
rainbow_shout profile image
Rainbow Shout

Thanks :)