2020-05-27 21:43:03 +00:00
|
|
|
import GoogleMapReact, {
|
|
|
|
|
BootstrapURLKeys, MapOptions, NESWBounds,
|
2020-09-08 20:52:00 +00:00
|
|
|
Size,
|
|
|
|
|
fitBounds
|
2020-05-27 21:43:03 +00:00
|
|
|
} from 'google-map-react';
|
2017-08-17 21:53:41 +00:00
|
|
|
import * as React from 'react';
|
2017-03-27 21:43:06 +00:00
|
|
|
|
|
|
|
|
const center = { lat: 0, lng: 0 };
|
|
|
|
|
|
2019-11-05 23:47:00 +00:00
|
|
|
const key: BootstrapURLKeys = { key: 'my-google-maps-key', libraries: "places" };
|
|
|
|
|
const client: BootstrapURLKeys = { client: 'my-client-identifier', v: '3.28' , language: 'en', libraries: "places", region: "PR" };
|
2018-05-10 19:58:03 +00:00
|
|
|
const options: MapOptions = {
|
|
|
|
|
zoomControl: false,
|
|
|
|
|
gestureHandling: 'cooperative',
|
|
|
|
|
styles: [
|
|
|
|
|
{
|
|
|
|
|
featureType: "administrative",
|
|
|
|
|
elementType: "all",
|
|
|
|
|
stylers: [ {saturation: "-100"} ]
|
2018-09-17 08:01:23 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
featureType: "administrative.neighborhood",
|
|
|
|
|
stylers: [ {visibility: "off" } ]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
elementType: "labels.text.stroke",
|
|
|
|
|
stylers: [ {color: "#242f3e"} ]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
stylers: [ {color: "#fcfffd"} ]
|
2018-05-10 19:58:03 +00:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
};
|
2017-06-22 15:20:42 +00:00
|
|
|
|
2020-02-18 18:53:24 +00:00
|
|
|
<GoogleMapReact center={center} heatmapLibrary={true} zoom={3} bootstrapURLKeys={client} options={options} />;
|
2020-05-27 21:43:03 +00:00
|
|
|
|
|
|
|
|
const bounds: NESWBounds = {
|
|
|
|
|
ne: {
|
|
|
|
|
lat: 55,
|
|
|
|
|
lng: 10,
|
|
|
|
|
},
|
|
|
|
|
sw: {
|
|
|
|
|
lat: 45,
|
|
|
|
|
lng: 20,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const size: Size = {
|
|
|
|
|
width: 1280,
|
|
|
|
|
height: 640
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fitBounds(bounds, size);
|