asked on
Hi,
In my react app. I am getting below error from the following code.
This code is taken from:
https://www.npmjs.com/package/google-maps-react
import React from "react";
import { Map, InfoWindow, Marker, GoogleApiWrapper } from 'google-maps-react';
const Googlemap = () => {
return (
<Map google={this.props.google} zoom={14}>
<Marker onClick={this.onMarkerClick}
name={'Current location'} />
<InfoWindow onClose={this.onInfoWindowClose}>
<div>
<h1>{this.state.selectedPlace.name}</h1>
</div>
</InfoWindow>
</Map>
);
}
export default GoogleApiWrapper({
apiKey: ("My key")
})(Googlemap)
Error:
ASKER
Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.
TRUSTED BY
From your example, I found the original here GitHub - fullstackreact/google-maps-react: Companion code to the "How to Write a Google Maps React Component" Tutorial
What I think I am seeing in your error is 'props' is not defined.
Do you have code that defines that?
Also, is your google api key activated? and set for your ip? That will also throw an error, but that will be a different error I believe.