Open blacksmoke26 opened 5 years ago
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
This issue is already reported here: https://github.com/Charmatzis/react-leaflet-google/issues/32
Google Maps JavaScript API warning: RetiredVersion
Above code produces following warning: