We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React-google-maps is nice library for my app, but I have trouble with using 'InfoBox'.
import { withGoogleMap, GoogleMap, Marker, InfoWindow } from 'react-google-maps'; import InfoBox from 'react-google-maps/lib/addons/InfoBox'; const GoogleMapWrapper = withGoogleMap((props) => ( <GoogleMap ref={ props.onMapLoad } zoom={ props.zoom || 13 } center={ props.center } onClick={ props.onMapClick } onDragEnd={ props.onMapDragEnd } onZoomChanged={ props.onZoomChanged } options={{ streetViewControl: false, disableDefaultUI: true }} > <Marker position={props.center} key={props.placeKey} defaultAnimation={2} onRightClick={() => props.onMarkerRightClick()} icon={ MARKER_ICON_INFO } > <InfoBox position={ props.center } options={{ position: props.center, content: '<div>' + props.placeKey + '</div>', closeBoxURL: "", maxWidth: 200, boxClass: 'txt_location', disableDefaultUI: false, visible: true }}> <div className="temp"></div> </InfoBox> </Marker> </GoogleMap> )); const MapCellSearchInput = React.createClass({ render() { <div className="map_box"> <GoogleMapWrapper containerElement={ <div style={{ width: '430px', height: '432px' }} /> } mapElement={ <div style={{ width: '430px', height: '432px' }} /> } onMapLoad={ (gmap) => {this.gmap = gmap;} } onMapClick={this.onMapClick} onMapDragEnd={ this.onMapDragEnd } onZoomChanged={ this.onZoomChanged } center={ mapCoordinate } placeKey={ placeKey } zoom={ zoom } /> </div> } })
It shows 'Uncaught Error: _registerComponent(...): Target container is not a DOM element' error. and when I remove InfoBox's child, like
<InfoBox position={ props.center } options={{ position: props.center, content: '<div>' + props.placeKey + '</div>', closeBoxURL: "", maxWidth: 200, boxClass: 'txt_location', disableDefaultUI: false, visible: true }}> </InfoBox>
It shows 'Uncaught Error: React.Children.only expected to receive a single React element child.', too. How can I solve this problem?
The text was updated successfully, but these errors were encountered:
Please refer to Getting Help section in the README (or #469).
Sorry, something went wrong.
No branches or pull requests
React-google-maps is nice library for my app, but I have trouble with using 'InfoBox'.
It shows 'Uncaught Error: _registerComponent(...): Target container is not a DOM element' error. and when I remove InfoBox's child, like
It shows 'Uncaught Error: React.Children.only expected to receive a single React element child.', too. How can I solve this problem?
The text was updated successfully, but these errors were encountered: