1.0.2 • Published 8 years ago
react-google-maps-addons v1.0.2
react-google-maps-addons
Collection of addons for react-google-maps
Addon Components: * Padding
Padding (offset)
It will add invisible divs to map controls at CENTER ControlPosition.
Aware of the padding: * opened InfoWindow
Unaware: * fitBounds, zoom, ... (for now... WIP)
Props
Name | Type | Default | Examples |
---|---|---|---|
top, right, bottom, left | String | null | "200px" , "10%" |
Example
import {GoogleMap} from "react-google-maps";
import {Padding} from "react-google-maps-addons";
export default function PaddedMap (props) {
return (
<section style={{height: "100%"}}>
<GoogleMap containerProps={{
style: {
height: "100%",
},
}}
defaultZoom={3}
>
<Padding left="300px" />
// other components...
</GoogleMap>
</section>
);
}