import GoogleMapReact from 'google-map-react'; import { Wrapper, Marker } from './styles'; const ParkingSpaceMarker = ({ text, free }) => ( {text} ); const GoogleMaps = ({ location, parkingSpacesLocation, zoneAreaColor }) => { const defaultProps = { zoom: 18, }; const drawZonePolygon = (map, maps) => { var zoneArea = new maps.Polygon({ paths: location.coords, strokeColor: zoneAreaColor, strokeOpacity: 0.8, strokeWeight: 2, fillColor: zoneAreaColor, fillOpacity: 0.2, }); zoneArea.setMap(map); }; return ( drawZonePolygon(map, maps)} > {parkingSpacesLocation.map((p, index) => ( ))} ); }; export default GoogleMaps;