でオートコンプリートを置くために、私は、このリンクとその作業を使用していますが、それはAPIが必須である場合は、Googleがangularjs
リンク警告を示しています。https://maps.googleapis.com/maps/api/js?libraries=places
警告:util.js:210 GoogleマップAPI警告:NoApiKeysをhttps://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
助けてください。事前におねがいします。
routerApp.directive('googleplace', function() {
return {
require: 'ngModel',
link: function(scope, element, attrs, model) {
var options = {
types: [],
componentRestrictions: {}
};
scope.gPlace = new google.maps.places.Autocomplete(element[0], options);
google.maps.event.addListener(scope.gPlace, 'place_changed', function(e) {
scope.$apply(function() {
model.$setViewValue(element.val());
//
scope.secondplacebox = scope.chosenPlace;
var latitude = scope.gPlace.getPlace().geometry.location.lat().toFixed(6);
\t var longitude = scope.gPlace.getPlace().geometry.location.lng().toFixed(6);
\t //alert(latitude);
\t \t scope.Fn_SearchFood(latitude,longitude,scope.date); \t \t
\t \t \t \t \t });
});
}
};
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script>
が、私はエラーを得た---- JSライブラリ=場所&センサー=偽&= AIzaSyDb_sP-jlvEvKsS6_7QTBwgXt0I4qCv1JYキー:?34 GoogleマップAPIエラー:RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript /エラーメッセージ#referer-not-allowed-map-error 許可するサイトのURL: –