fullstackreact / google-maps-react

Companion code to the "How to Write a Google Maps React Component" Tutorial
https://www.fullstackreact.com/articles/how-to-write-a-google-maps-react-component/
MIT License
1.63k stars 819 forks source link

Link and anchor tag not working after map #124

Open nikhil4326 opened 7 years ago

nikhil4326 commented 7 years ago

Hey, I have Links below map(Tag). Those are not working. when I removed Map, links started working fine. Check below code


<Card>
          <CardText>
          <div style={{ 'height': '263px', 'width':'376px' }}>
            <Map google={this.props.google} style={{ 'height': '263px', 'width':'376px' }}
              initialCenter={{lat: this.state.center.lat, lng: this.state.center.lng}} clickableIcons={true}
              zoom={8}>
              <Marker onClick={this.onMarkerClick}
                name='Current location'
                position={{lat: this.state.center.lat, lng: this.state.center.lng}}/>
              <Marker onClick={this.onMarkerClick}
                name='McKinney Falls State Park'
                position={{lat: 30.181045, lng: -97.7255593}}/>
              <Marker onClick={this.onMarkerClick}
                name='Pedernales Falls State Park'
                position={{lat: 30.308054, lng: -98.257649}}/>
              <Marker onClick={this.onMarkerClick}
                name='Lockhart State Park'
                position={{lat: 29.855278, lng: -97.697778}}/>
              <InfoWindow
                marker={this.state.activeMarker}
                visible={this.state.showingInfoWindow}
                onCloseClick={this.onInfoWindowClose}>
                  <div>
                    {this.state.selectedPlace.name}
                  </div>
              </InfoWindow>
            </Map>
          </div>
          </CardText>
        </Card>
        <Card style={cardStyle}>
          <CardText>
            <span className='textSize20'>
              <Link to='/searchedLocationDetail'> Falls</Link><br/>
            </span><br/>
            <p>XXXXXXX</p>
          </CardText>
        </Card>

Even try to replace with anchor tag, Not working. Lease help me in resolving above issues.

sethanderson8 commented 5 years ago

Hi, Did you find a solution for this issue?