-
Notifications
You must be signed in to change notification settings - Fork 855
Open
Description
When the map is scrolled and the mouse is released, the markers blink from where they were initially positioned.
The code
import React from "react";
import GoogleMapReact from 'google-map-react';
const AnyReactComponent = ({ text }) => (
<div style={{
width: "70px",
backgroundColor: "black",
color: "white",
padding: 2,
textAlign: "center"
}}>
{text}
</div>
);
const center = {
lat: 8.789109769101659,
lng: -75.85785616189241,
}
const zoom = 17
export default function SimpleMap(){
console.log("simple map render")
return (
<div style={{ height: '100vh', width: '100%' }}>
<GoogleMapReact
bootstrapURLKeys={{ key: THE_KEY }}
defaultCenter={center}
defaultZoom={zoom}
>
<AnyReactComponent
lat={center.lat}
lng={center.lng}
text="My Marker"
/>
</GoogleMapReact>
</div>
);
}
Screenshots 🖥
IMPORTANT: It always happens, in this gif it only happens the first two times, but it's because when converting video to gif the quality drops
Environment:
- OS: windows
- Browser chrome, mozilla, etc.
- google-map-react: 2.1.10
- react 18.1.0
Toddish, zillBoy, benjaminhonorio, chyde, rvenky125 and 24 more
Metadata
Metadata
Assignees
Labels
No labels