Describe the bug 馃悰
My map pins are rendered on the correct position initally. They aren't positioned correct as soon as i zoom or pan the map.
To Reproduce 馃攳
Steps to reproduce the behavior:
import React from "react";
import GoogleMapReact from 'google-map-react';
const AnyReactComponent = ({ text }) => <div style={{
color: 'white',
background: 'grey',
padding: '15px 10px',
display: 'inline-flex',
textAlign: 'center',
alignItems: 'center',
justifyContent: 'center',
borderRadius: '100%',
transform: 'translate(-50%, -50%)'
}}>{text}</div>;
export default class SimpleMap extends React.Component {
static defaultProps = {
center: {lat: 59.95, lng: 30.33},
zoom: 11
};
render() {
return (
// Important! Always set the container height explicitly
<div style={{ height: '200px', width: '200px' }}>
<GoogleMapReact
bootstrapURLKeys={{ key: "xxx" }}
defaultCenter={this.props.center}
defaultZoom={this.props.zoom}
>
<AnyReactComponent
lat={59.955413}
lng={30.337844}
text={'Kreyser Avrora'}
/>
</GoogleMapReact>
</div>
);}
}
Expected behavior 馃挱
Map Pins shall be repositioned according to their langitude and lotitude properties after zoom or pan.
Environment:
- OS: windows
- Browser: edge
Describe the bug 馃悰
My map pins are rendered on the correct position initally. They aren't positioned correct as soon as i zoom or pan the map.
To Reproduce 馃攳
Steps to reproduce the behavior:
Expected behavior 馃挱
Map Pins shall be repositioned according to their langitude and lotitude properties after zoom or pan.
Environment: