Comments (4)
I would like to knonw this as well. It seems that it is somehow passed in through the this.props.google item, but I am not sure what that is, or how to use it...
from google-maps-react.
There is a file in the root of the project called '.env.example'. Place your key in this file and rename to '.env'. (I have single quotes around my key but I'm not sure if that necessary.)
If you're still having trouble, check out the stand alone project in the 'GettingStarted' folder here: 'https://github.com/tzerb/google-maps-react'
from google-maps-react.
It's on README: https://github.com/fullstackreact/google-maps-react#automatically-lazy-loading-google-api
Automatically Lazy-loading Google API
The library includes a helper to wrap around the Google maps API. The
GoogleApiWrapper
Higher-Order component accepts a configuration object which must include anapiKey
. See lib/GoogleApi.js for all >options it accepts.import {GoogleApiWrapper} from 'GoogleMapsReactComponent' // ... export class Container extends React.Component {} export default GoogleApiWrapper({ apiKey: __GAPI_KEY__ })(Container)The
GoogleApiWrapper
automatically passes theManually loading the Google API
If you prefer not to use the automatic loading option, you can also pass the
window.google
instance as aprop
to your<Map />
component.
from google-maps-react.
Look at here
from google-maps-react.
Related Issues (20)
- How can I hide api key when inspecting on network? HOT 1
- cors error HOT 1
- prop-types should be a proper dependency
- Circle dragend event
- Unable to get marker coordinates on drag HOT 1
- Hide labels.text config on init Map
- is it possible to load geojson HOT 1
- Pin Drag Method Of Google map
- npm ERR ! HOT 1
- React cant compile anymore
- Please Update npmjs.com package to 2.0.8 its still 2.0.6 HOT 13
- Draw a route on the map HOT 1
- How to get the Current Zoom value on the Map? Is there any function to that?
- What is the difference between bounds and marginBounds?
- getting blank page maps not rendered
- Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<InfoWindow> & Readonly<IInfoWindowProps>'
- Exposing Google Map API key HOT 2
- Style the marker
- Updated version published as @peacechen/google-maps-react
- Custom styles not beign applied to map HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-maps-react.