GeocoderService.js 980 B

123456789101112131415161718192021222324252627282930
  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. /**
  20. * @function
  21. *
  22. * @param {String} query The query to be sent to the geocoder service
  23. * @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
  24. * @returns {Promise<GeocoderService~Result[]>}
  25. */
  26. GeocoderService.prototype.geocode = DeveloperError.throwInstantiationError;
  27. export default GeocoderService;