question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid prop `center`

See original GitHub issue

Trying to get this to work but when calling <GoogleMapReact center={mapCenter} defaultZoom={11} />, I’m getting the error message as follows:

Warning: Failed prop type: Invalid prop ``center`` supplied to ``GoogleMap``.

Any ideas?

I’ve also tried replacing center with defaultCenter as per the docs.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

29reactions
istarkovcommented, Mar 9, 2017

Please open examples, trace, learn, this is not the place where I teach people to code. Just library issues.

24reactions
istarkovcommented, Mar 9, 2017

Please learn js 😃 in your case lat lng is a lambdas not an object

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid prop `center` supplied to `GoogleMap`. React.js
im trying to intialize google maps using google maps react library and wanted the map to change every time i search for a...
Read more >
Invalid prop `center` supplied to `GoogleMap`. React.js ...
Coding example for the question Invalid prop `center` supplied to `GoogleMap`. ... GoogleMap api - ReferenceError: Invalid left-hand side in assignment ...
Read more >
type check failed for prop "items". expected array, got string ...
Learn moreGetting startedBlogHelp CenterFAQiOS AppAndroid AppDeveloper Docs. FeaturesPrivate searchApp StoreYouCodeYouStudyYouSocialBangs.
Read more >
A Beginner's Guide to google-map-react | by Matt Croak Code
Yep, it's going to be a prop too. <GoogleMapReact bootstrapURLKeys={{ key: YOUR_API_KEY, language: 'en' }} defaultCenter={this.props.center}
Read more >
Invalid Prop Name · ReasonReact
Invalid Prop Name. Prop names like type (as in <input type="text" /> ) aren't syntactically valid; type is a reserved keyword in Reason/OCaml....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found