DefinitelyTyped/types/google-map-react/google-map-react-tests.tsx
Andres Rosero 3523c68c52 @types/google-map-react - optional elementType and featureType of a MapTypeStyle (#28766)
* optional elementType and featureType of a MapTypeStyle

* little fix
2018-09-17 01:01:23 -07:00

32 lines
953 B
TypeScript

import GoogleMapReact, { BootstrapURLKeys, MapOptions } from 'google-map-react';
import * as React from 'react';
const center = { lat: 0, lng: 0 };
const key: BootstrapURLKeys = { key: 'my-google-maps-key' };
const client: BootstrapURLKeys = { client: 'my-client-identifier', v: '3.28' , language: 'en' };
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} zoom={3} bootstrapURLKeys={client} options={options} />;