2016-12-07 117 views
0

我使用谷歌Places API的Web服務在我的網站上自動完成地圖波蘭語爲谷歌API雲耀斑不起作用

enter image description here

位置一旦我能夠在雲耀斑波蘭語,自動完成不工作

我使用下面的代碼自動完成位置

HTML

<input type="text" id="pac-input" autocomplete="off" placeholder="برای تسریع عملیات، منطقه موردنظر خود را وارد کنید. مثال: نارمک" lang="fa" class="form-control input-sm binput" name="district_title" value="" style="height: 35px"/> 

的JavaScript

var input = (document.getElementById('pac-input')); 
     //gmap.controls[google.maps.ControlPosition.TOP_LEFT].push($(input).parent()[0]); 
     var searchBox = new google.maps.places.SearchBox((input)); 

     google.maps.event.addListener(searchBox, 'places_changed', function() { 
      var places = searchBox.getPlaces(); 
      if (places.length == 0) { 
       return; 
      } 
      var bounds = new google.maps.LatLngBounds(); 
      for (var i = 0, place; place = places[i]; i++) { 
       bounds.extend(place.geometry.location); 
      } 
      gmap.fitBounds(bounds); 
      gmap.setZoom(15); 
     }); 
     find_loc.show(); 



    } 
    $('#pac-input').keypress(function (e) { 
     if (e.keyCode == 13) { 
      e.preventDefault(); 
     } 
    }); 
    function deleteOverlays() { 
     if (markersArray) { 
      for (var i in markersArray) { 
       markersArray[i].setMap(null); 
      } 
      markersArray.length = 0; 
     } 
    } 

回答

0
minify for Javascript can cause these sorts of errors. 
we have to remove minify in cloudflare 

enter image description here

我們也許可以寫一個頁面規則,該URL禁用性能,同時留在該網站默認的其餘部分。 或者完全關閉。