We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, thank you for this wonderful API.
I am building an app with deckGL and its pretty straightforward to use but I am currently having difficulty with the authenticated area.
I understand that this is currently possible
`async _onLoginSuccess(user, loginProvider) { const token = 'Google OAuth2 access token' await EarthEngineLayer.initializeEEApi({clientId: EE_CLIENT_ID, token}); this.setState({eeObject: ee.Image('CGIAR/SRTM90_V4')}); }`
But it'll be nice to have an example code on how to use the Google service account API key option for this who would like to use that option.
like so `// Require client library and private key.
var ee = require('@google/earthengine'); var privateKey = require('./.private-key.json'); // Initialize client library and run analysis. var runAnalysis = function() { ee.initialize(null, null, function() { // ... run analysis ... }, function(e) { console.error('Initialization error: ' + e); }); };
// Authenticate using a service account. ee.data.authenticateViaPrivateKey(privateKey, runAnalysis, function(e) { console.error('Authentication error: ' + e); });`
I have tried using a returned ee object from my nodejs server like so
` const image = await ee .Image('CGIAR/SRTM90_V4') .getMap({ min: 0, max: 60 }, ({ mapid }) => res.send(mapid)); return res.send(image);`
fetched the eeObject from my server and add to the EarthEngineLayer bypassing the Oauth2 option like so
EarthEngineLayer
` const layers = [ new EarthEngineLayer({ image: eeObject, // eeObject fetched from redux actions //elevation: googleTerain, opacity: 1, visParams, }), ];`
Then render the map
<DeckGL controller {...INITIAL_VIEW_STATE} layers={layers}/>
Problem is that its blank, with no error message or anything
but correct me if I am wrong
Shouldn't it work considering that it's been authenticated from the nodejs server through the service account API key?
I will greatly appreciate your insight about this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, thank you for this wonderful API.
I am building an app with deckGL and its pretty straightforward to use but I am currently having difficulty with the authenticated area.
I understand that this is currently possible
But it'll be nice to have an example code on how to use the Google service account API key option for this who would like to use that option.
like so `// Require client library and private key.
// Authenticate using a service account.
ee.data.authenticateViaPrivateKey(privateKey, runAnalysis, function(e) {
console.error('Authentication error: ' + e);
});`
I have tried using a returned ee object from my nodejs server like so
fetched the eeObject from my server and add to the
EarthEngineLayer
bypassing the Oauth2 option like soThen render the map
<DeckGL controller {...INITIAL_VIEW_STATE} layers={layers}/>
Problem is that its blank, with no error message or anything
but correct me if I am wrong
Shouldn't it work considering that it's been authenticated from the nodejs server through the service account API key?
I will greatly appreciate your insight about this.
The text was updated successfully, but these errors were encountered: