mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* Remove outdated export * Add util definitions to main export * Correct import positioning * Update google-map-react-tests.tsx * Remove redundant import * Update version in header * Correct header versioning * Update export syntax to match package * Remove redundant exports * enable esModuleInterop
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import GoogleMapReact, {
|
|
BootstrapURLKeys, MapOptions, NESWBounds,
|
|
Size,
|
|
fitBounds
|
|
} from 'google-map-react';
|
|
import * as React from 'react';
|
|
|
|
const center = { lat: 0, lng: 0 };
|
|
|
|
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" };
|
|
const options: MapOptions = {
|
|
zoomControl: false,
|
|
gestureHandling: 'cooperative',
|
|
styles: [
|
|
{
|
|
featureType: "administrative",
|
|
elementType: "all",
|
|
stylers: [ {saturation: "-100"} ]
|
|
},
|
|
{
|
|
featureType: "administrative.neighborhood",
|
|
stylers: [ {visibility: "off" } ]
|
|
},
|
|
{
|
|
elementType: "labels.text.stroke",
|
|
stylers: [ {color: "#242f3e"} ]
|
|
},
|
|
{
|
|
stylers: [ {color: "#fcfffd"} ]
|
|
}
|
|
],
|
|
};
|
|
|
|
<GoogleMapReact center={center} heatmapLibrary={true} zoom={3} bootstrapURLKeys={client} options={options} />;
|
|
|
|
const bounds: NESWBounds = {
|
|
ne: {
|
|
lat: 55,
|
|
lng: 10,
|
|
},
|
|
sw: {
|
|
lat: 45,
|
|
lng: 20,
|
|
}
|
|
};
|
|
|
|
const size: Size = {
|
|
width: 1280,
|
|
height: 640
|
|
};
|
|
|
|
fitBounds(bounds, size);
|