Initialize the library. If this hasn't been called by the time any object constructor is used, it will be called then. If this is called a second time with a different baseurl or tileurl, this doesn't do an un-initialization of e.g.: the previously loaded Algorithms, but will overwrite them and let point at alternate servers.

If initialize() is first called in asynchronous mode (by passing a success callback), any future asynchronous mode calls will add their callbacks to a queue and all the callbacks will be run together.

If a synchronous mode call is made after any number of asynchronous calls, it will block and execute all the previously supplied callbacks before returning.

In most cases, an authorization token should be set before the library is initialized, either with or When a proxy is used, an auth token may not be required.

ee.initialize(baseurl, tileurl, successCallback, errorCallback, xsrfToken)
baseurlString, optional

The (proxied) EarthEngine REST API endpoint.

tileurlString, optional

The (unproxied) EarthEngine REST tile endpoint.

successCallbackFunction, optional

An optional callback to be invoked when the initialization is successful. If not provided, the initialization is done synchronously.

errorCallbackFunction, optional

An optional callback to be invoked with an error if the initialization fails.

xsrfTokenString, optional

A string to pass in the "xsrfToken" parameter of EE API XHRs.