2016-11-06 1 views
1

저는이 분야에서 새로운 것으로서 하나의 APP에 자동 완성 주소 양식을 구현하려고합니다. 하지만 예제 코드를 실행하려고하면 오류가 발생합니다. 아래 오류가 내 콘솔에 표시됩니다. 왜 그런지 알아?Google 공식 지역 정보 자동 완성 주소 양식 예제 오류가 발생 했습니까?

https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

나는 나의 API를 링크가있는 JS 링크를 교체해야합니다. https://plnkr.co/edit/1ptaVzmD7EwPZ6dU23gR?p=preview

try.html:161 Uncaught TypeError: Cannot read property 'setBounds' of undefined 
    at file:///Users/shen/Desktop/new%20meetup/try.html:161:25(anonymous function) @ try.html:161 
try.html:161 Uncaught TypeError: Cannot read property 'setBounds' of undefined 
    at file:///Users/shen/Desktop/new%20meetup/try.html:161:25(anonymous function) @ try.html:161 
js?key=AIzaSyBDhab7yuMx-2lllD8kwZIF-yIVGnsCx-0&libraries=places:34 

Google Maps API error: ApiNotActivatedMapError https://developers.google.com/maps/documentation/javascript/error-messages#api-not-activated-map-error 

당신은 당신의 브라우저에 그것을 시도 할 수 있습니다 : 여기 내 구현 데모입니다.

답변

1

Maps JavaScript API의 작업 공간 라이브러리를 사용하려면 프로젝트에서 Places API 웹 서비스를 활성화해야합니다.

오류 메시지는 분명 것 같다 "Google지도 API 오류 : ApiNotActivatedMapError"구글은 2016년 6월 22일에이 변경을 발표,이 블로그 게시물에서

봐 :

https://googlegeodevelopers.blogspot.com.es/2016/06/building-for-scale-updates-to-google.html

We now count Google Maps JavaScript API client-side requests towards the daily limit of the associated web service API.*

관련 문제