GeocoderService.js 879 B

1234567891011121314151617181920212223242526272829
  1. import DeveloperError from "./DeveloperError.js";
  2. /**
  3. * @typedef {Object} GeocoderService.Result
  4. * @property {String} displayName The display name for a location
  5. * @property {Rectangle|Cartesian3} destination The bounding box for a location
  6. */
  7. /**
  8. * Provides geocoding through an external service. This type describes an interface and
  9. * is not intended to be used.
  10. * @alias GeocoderService
  11. * @constructor
  12. *
  13. * @see BingMapsGeocoderService
  14. * @see PeliasGeocoderService
  15. * @see OpenCageGeocoderService
  16. */
  17. function GeocoderService() {}
  18. /**
  19. * @function
  20. *
  21. * @param {String} query The query to be sent to the geocoder service
  22. * @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
  23. * @returns {Promise<GeocoderService.Result[]>}
  24. */
  25. GeocoderService.prototype.geocode = DeveloperError.throwInstantiationError;
  26. export default GeocoderService;