<script src="https://cdn.jsdelivr.net/npm/places.js@1.19.0"></script>
<input type="search" id="address-input" placeholder="Where are we going?" />
<script>
var placesAutocomplete = places({
appId: 'myappID',
apiKey: 'mykey',
container: document.querySelector('#address-input')
});
</script>
这是我的代码,仅摘自https://community.algolia.com/places/documentation.html#api-options-container入门页面。但是我无法使它工作。这是我在控制台中遇到的错误-
script.js:12 Uncaught ReferenceError: places is not defined
at script.js:12
at script.js:27
(anonymous) @ script.js:12
(anonymous) @ script.js:27
DevTools failed to load SourceMap: Could not load content for https://cdn.jsdelivr.net/npm/places.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
抱歉,格式太糟糕了,这是我的第一个问题,我对这一切都很陌生。