react-google-maps
Advanced tools
Changelog
9.0.0 (2017-10-16)
MarkerWithLabel
support (b3985f4)Marker
(3f7670f), closes #595 #604markerwithlabel
to dependencies (b4fe224)Before:
import { Marker } from "react-google-maps";
<Marker
position={{ lat: -34.397, lng: 150.644 }}
labelAnchor={new google.maps.Point(0, 0)}
labelContent="<div>Hello There!</div>"
labelStyle={{/* WON'T WORK */}}
/>
After:
import MarkerWithLabel from "react-google-maps/lib/components/addons/MarkerWithLabel";
<MarkerWithLabel
position={{ lat: -34.397, lng: 150.644 }}
labelAnchor={new google.maps.Point(0, 0)}
labelStyle={{backgroundColor: "yellow", fontSize: "32px", padding: "16px"}}
>
<div>Hello There!</div>
</MarkerWithLabel>
<a name="8.5.0"></a>