function IonGeocoderService(options) {
  options = options ?? Frozen.EMPTY_OBJECT;

  //>>includeStart('debug', pragmas.debug);
  Check.typeOf.object("options.scene", options.scene);
  //>>includeEnd('debug');

  const geocodeProviderType =
    options.geocodeProviderType ?? IonGeocodeProviderType.DEFAULT;
  //>>includeStart('debug', pragmas.debug);
  validateIonGeocodeProviderType(geocodeProviderType);
  //>>includeEnd('debug');

  const accessToken = options.accessToken ?? Ion.defaultAccessToken;
  const server = Resource.createIfNeeded(options.server ?? Ion.defaultServer);
  server.appendForwardSlash();

  const defaultTokenCredit = Ion.getDefaultTokenCredit(accessToken);
  if (defined(defaultTokenCredit)) {
    options.scene.frameState.creditDisplay.addStaticCredit(
      Credit.clone(defaultTokenCredit),
    );
  }

  const searchEndpoint = server.getDerivedResource({
    url: "v1/geocode",
  });

  if (defined(accessToken)) {
    searchEndpoint.appendQueryParameters({ access_token: accessToken });
  }

  this._accessToken = accessToken;
  this._server = server;
  this._pelias = new PeliasGeocoderService(searchEndpoint);
  // geocoderProviderType isn't stored here directly but instead relies on the
  // query parameters of this._pelias.url.  Use the setter logic to update value.
  this.geocodeProviderType = geocodeProviderType;
}
Provides geocoding through Cesium ion.
@alias IonGeocoderService
@constructor

@param {object} options Object with the following properties:
@param {Scene} options.scene The scene
@param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
@param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
@param {IonGeocodeProviderType} [options.geocodeProviderType=IonGeocodeProviderType.DEFAULT] The geocoder the Cesium ion API server should use to fulfill this request.

@see Ion