Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Google Maps JavaScript API warning: RetiredVersion #38

Open
blacksmoke26 opened this issue Mar 4, 2019 · 2 comments
Open

Google Maps JavaScript API warning: RetiredVersion #38

blacksmoke26 opened this issue Mar 4, 2019 · 2 comments

Comments

@blacksmoke26
Copy link

Google Maps JavaScript API warning: RetiredVersion

import React from 'react';
import { Consumer } from './../base/Provider';
import { Map } from 'react-leaflet';
import { GoogleLayer } from 'react-leaflet-google';

/**
 * Google Map area component
 */
class MapArea extends React.Component {
	state = {
		lat: 42.09618442380296,
		lng: -71.5045166015625,
		zoom: 13,
	};

	render () {
		const position = [this.state.lat, this.state.lng];

		// noinspection RequiredAttributes
		return (
			<Map center={position} zoom={this.state.zoom} zoomControl={true}>
				<GoogleLayer  googlekey={'@googleApiKey'} maptype="road" />
			</Map>
		);
	}
}

MapArea.contextType = Consumer;

export default MapArea;

Above code produces following warning:

Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
mw.m                	util.js:221
(anonymous function)	js:122
Async call from Promise.then
(anonymous function)	js:122
Async call from setTimeout
Bh                  	js:122
google.maps.Load    	js:21
(anonymous function)	js:211
(anonymous function)	js:211
@kalanda
Copy link

kalanda commented Mar 12, 2019

This issue is already reported here: #32

@Fiorello
Copy link

#39 I created a pull request that should solve this problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants