Javascript 谷歌地球引擎成角?

Javascript 谷歌地球引擎成角?,javascript,angular,Javascript,Angular,我使用这段代码将google earth引擎添加到angular中,并收到以下错误:初始化错误:无法使用“in”运算符在未定义中搜索“Filter”。有人知道那个错误吗?提前谢谢 const ee = require('@google/earthengine'); const CLIENT_ID = 'ID'; initMap = function () { // Initialize client library. const initialize = function () { ee.in

我使用这段代码将google earth引擎添加到angular中,并收到以下错误:初始化错误:无法使用“in”运算符在未定义中搜索“Filter”。有人知道那个错误吗?提前谢谢

const ee = require('@google/earthengine');
const CLIENT_ID = 'ID';

initMap = function () {
// Initialize client library.
const initialize = function () {
ee.initialize(null, null, () => {
  createMap();
}, (e) => {
  console.error('Initialization error: ' + e);
});
};
 // Authenticate using an OAuth pop-up.
 ee.data.authenticateViaOauth(CLIENT_ID, initialize, (e) => {
 console.error('Authentication error: ' + e);
 }, null, () => {
 ee.data.authenticateViaPopup(initialize);
 });
 };

 function createMap() {
 // Initialize map.
 const mapEl = document.querySelector('#map');
 const map = new google.maps.Map(mapEl, {
 center: new google.maps.LatLng(39.8282, -98.5795),
 zoom: 5
 });

  // Load EE image.
  const image = ee.Image('srtm90_v4');
  image.getMap({ min: 0, max: 1000 }, ({ mapid, token }) => {

  // Create Google Maps overlay.
  const mapType = new google.maps.ImageMapType({
  getTileUrl: ({ x, y }, z) =>
    `https://earthengine.googleapis.com/map/${mapid}/${z}/${x}/${y}? 
  token=${token}`,
  tileSize: new google.maps.Size(256, 256)
  });

  // Add the EE layer to the map.
  map.overlayMapTypes.push(mapType);

  });
  }

您是否在angular应用程序中实现了此功能?您是否收到了任何解决方案?您是否在angular应用程序中实现了此功能?您是否收到了任何解决方案?