This commit is contained in:
Christian Anetzberger
2022-01-29 20:48:35 +01:00
commit 01907eb338
144 changed files with 11275 additions and 0 deletions

224
components/GogoleMaps.jsx Normal file
View File

@@ -0,0 +1,224 @@
import React from "react";
import { GoogleMap, LoadScript, Marker } from "@react-google-maps/api";
const styles = [
{
featureType: "all",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "administrative",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "administrative",
elementType: "labels.text.fill",
stylers: [
{
color: "#444444",
},
{
visibility: "off",
},
],
},
{
featureType: "administrative.neighborhood",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "landscape",
elementType: "all",
stylers: [
{
visibility: "on",
},
{
color: "#e0dfe0",
},
],
},
{
featureType: "landscape",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "poi",
elementType: "all",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "poi",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "poi.park",
elementType: "geometry",
stylers: [
{
color: "#a8a9a8",
},
{
visibility: "on",
},
],
},
{
featureType: "road",
elementType: "all",
stylers: [
{
saturation: -100,
},
{
lightness: 45,
},
],
},
{
featureType: "road",
elementType: "geometry.fill",
stylers: [
{
visibility: "on",
},
{
color: "#5b5b5a",
},
],
},
{
featureType: "road",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "road.highway",
elementType: "all",
stylers: [
{
visibility: "simplified",
},
],
},
{
featureType: "road.highway",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "road.arterial",
elementType: "labels.icon",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "transit",
elementType: "all",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "transit",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
{
featureType: "water",
elementType: "all",
stylers: [
{
color: "#ffffff",
},
{
visibility: "on",
},
],
},
{
featureType: "water",
elementType: "labels",
stylers: [
{
visibility: "off",
},
],
},
];
const containerStyle = {
width: "100%",
height: "100%",
};
const center = {
lat: 48.191044224831614,
lng: 11.379406506650541,
};
function GoogleMaps() {
return (
<LoadScript googleMapsApiKey="AIzaSyDx-VOQjrzQcBxWsLXeT9KhihxeQf6TRzY">
<GoogleMap
mapContainerStyle={containerStyle}
center={center}
zoom={17}
options={{
styles: styles,
}}
>
<Marker position={center} label="Hans Prothmann GmbH" />
<></>
</GoogleMap>
</LoadScript>
);
}
export default React.memo(GoogleMaps);