Forráskód Böngészése

moved google api key to config file

Bernadette Elena Hammerle 4 éve
szülő
commit
c28ae46be1
1 módosított fájl, 2 hozzáadás és 1 törlés
  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