Monaca Onsen UI Discord Chat Github Repo

Problem with Google Maps



  • @jmuriel Our code looks something like this:

    maybeRenderInfoWindow()
    {
    	if ( this.state.showInfoWindow )
    	{
    		return (
    			<InfoWindow
    				key={this.state.showCluster}	
    				position={this.state.showCluster.getCenter()}
    				maxWidth={300}
    				onCloseclick={ () =>
    				{
    					this.setState(
    					{
    						showInfoWindow: false,
    						showCluster: null,
    					} );
    				}}
    			>
    				<div style={styles.serviceList}>
    					<ServiceList
    						selectable={true}
    						services={services}
    						onSelect={ ( service ) =>
    						{
    							this.setState(
    							{
    								showInfoWindow: false,
    								showCluster: null
    							} );
    						} }
    					/>
    				</div>
    			</InfoWindow>
    		);
    	}
    	else
    	{
    		return null;
    	}
    }
    

    Basically, we render an Onsen list inside the InfoWindow component. We are using react-google-maps as the React wrapper for Google Maps.

    Let me know if you’re still having problems after looking at that code snippet.

    Take care,

    Scott