浏览代码

moved google api key to config file

Bernadette Elena Hammerle 4 年之前
父节点
当前提交
c28ae46be1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Google.js

+ 2 - 1
src/Google.js

@@ -1,6 +1,7 @@
 import React from "react";
 import GoogleMapReact from 'google-map-react';
 import "./css/maps.css";
+import apiKey from './config/googleApiKey.js';
 
 const LONGITUDE = 14.320570
 const LATITUDE = 48.336950
@@ -19,7 +20,7 @@ export default class Google extends React.Component{
     return (
       <div style={{ height: '450px', width: '600px' }}>
         <GoogleMapReact
-          bootstrapURLKeys={{ key: "AIzaSyBD8LxHc8lWhx6Lwxaha92dMQc-EBr82wU" }}
+          bootstrapURLKeys={{ key: apiKey }}
           defaultCenter={position}
           defaultZoom={this.state.zoom}
           yesIWantToUseGoogleMapApiInternals