Explorar o código

moved google api key to config file

Bernadette Elena Hammerle %!s(int64=4) %!d(string=hai) anos
pai
achega
c28ae46be1
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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