I am referring to samples from various sites, but I get an error.
I have written the library loading in the libraries parameter of the api bootstrap URL.Other than that, I am writing the same way after reading and Google references, but I get an error.
ERROR: Uncaught TypeError: Cannot read property 'PlacesService' of undefined
This error does not disappear.
javascript html5 api
ERROR: Uncaught TypeError: Cannot read property 'PlacesService' of undefined
Google.maps.places
appears to be undefined
.
There are two possible causes.
(1) The places library is not enabled when loading the Google Maps API
http://maps.google.com/maps/api/js?sensor=true&libraries=places
not
http://maps.google.com/maps/api/js?sensor=true
Are you trying to do something like that?
But
I have written the library loading in the libraries parameter of the api bootstrap URL.
It says...
It might be better to check the spelling just in case.
(Is there no place for places?)etc.)
(2) Google.maps.places with undefined ones
google.maps.places=undefined;
It's a little hard to think about, but if you do something like the above somewhere, the error will be reproduced.
I don't think (1) and (2) are the deciding factors...
© 2024 OneMinuteCode. All rights reserved.