Hey, Have you got any solution for this?
On Friday, 19 July 2019 11:56:37 UTC+5:30, george popescu wrote: > > Hello, if somebody worked with google earth engine API into Angular please > help me. I receive this error when I try to initialize library: Cannot use > 'in' operator to search for 'Filter' in undefined > This is code: > > public googleEarthEngine() { > // Load client library. > const ee = require('@google/earthengine'); > > // 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('my code', initialize, (e) => { > console.error('Authentication error: ' + e); > }, null, () => { > ee.data.authenticateViaPopup(initialize); > }); > > > function createMap() { > // Initialize map. > const mapEl = document.querySelector('#earthmap'); > 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); > > }); > } > } > > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/d3c718e8-9633-485d-94c8-9d911630cd07o%40googlegroups.com.