2016-11-06 1 views
2

나는이 필드에 새로운 요소이며, 내 애플 리케이션에 구글 자동 완성을 구현하려하고 은 https://plnkr.co/edit/GUs28h2ncbbhx8dEmiz5?p=preview과 같다. 이것은 Google지도를 테스트하는 매우 간단한 예입니다. 하지만 자동 완성의 언저리는 항상 모달 밖입니다. 로그인을 누르고 주소를 입력하면 확인할 수 있습니다. 왜 그런지 아십니까? BTW구글 모달을 모달로 표시하는 방법

<!DOCTYPE html> 
<html lang="en" ng-app='myApp'> 
<head> 
    <meta charset="utf-8"> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> 
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> 
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> 
    <script src="all.js"></script> 
    <!--link rel="stylesheet" href="main.css"--> 
</head> 
<body ng-controller="mainControl as mc"> 

    <div> 
     <div ng-hide="mc.values.logged"> 

      <button type="button" class="btn" data-toggle="modal" data-target=".logIn">Log In</button> 
     </div> 
    </div> 

    <div class="logIn modal fade" id="logIn" ng-controller='logInControl as lc'> 
     <div class="modal-dialog"> 
      <div class="modal-content"> 
       <div class="modal-body"> 
        <form id="eventForm" name="eventForm" ng-submit="ec.submit()"> 

         <label for="locationTextField">Location</label> 

       <input id="locationTextField" type="text" size="50"> 

        </form> 

       </div> 

      </div> 
     </div> 

    </div> 



</body> 
</html> 

, 나는 성공이 또 다른 질문 하나의 API 키를 신청해야하지만 나는 그것이하여 그 이유를 말해 Coud

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBDhab7yuMx-2lllD8kwZIF-yIVGnsCx-0&libraries=places"></script> 

와 링크를 대체 사용할 수없는 이유는 무엇입니까? 게시물 SO 관련이있는

.pac-container { 
    z-index: 1051 !important; 
} 

도 제안 확인하시기 바랍니다 솔루션 : enter image description here

답변

0

당신은 구글이 함께 부트 스트랩 모달 1050 Z- 색인 이상 자동 완성 드롭 다운 결과를 배치 퍼팅 시도, 이슈 트래커 로그인 issue #4160에서 수 기준 자료 :

반면에 API 키와 관련하여 콘솔에 표시되는 오류 코드 또는 메시지를 확인한 다음 Google Maps JavaScript API Error CodesGoogle Maps JavaScript API Error Codes for Developers으로 수정하는 방법을 확인하십시오.

관련이 잘못된 API 키 SO post도 도움이 될 수 있습니다.

해피 코딩!

관련 문제