google-map-react update BootstrapURLKeys

add support for client identifier and version instead of api key
This commit is contained in:
cwmoo740
2017-06-22 11:20:42 -04:00
parent 3079f202b8
commit 624cf76cb2
2 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,9 @@
import GoogleMapReact from 'google-map-react';
import GoogleMapReact, { BootstrapURLKeys } from 'google-map-react';
import * as React from 'react';
const center = { lat: 0, lng: 0 };
<GoogleMapReact center={center} zoom={3}/>;
const key: BootstrapURLKeys = { key: 'my-google-maps-key' };
const client: BootstrapURLKeys = { client: 'my-client-identifier', v: '3.28' , language: 'en' };
<GoogleMapReact center={center} zoom={3} bootstrapURLKeys={client}/>;

View File

@@ -6,10 +6,7 @@
import * as React from 'react';
export interface BootstrapURLKeys {
key: string;
language?: string;
}
export type BootstrapURLKeys = ({ key: string; } | { client: string; v: string; }) & { language?: string };
export interface Options {
styles?: any[];