/// import { GoogleMapsApiService, IGoogleMap, Coord, CoordPath, Path } from '@bespunky/angular-google-maps/core'; import { GoogleMapsDrawableOverlay } from '../../abstraction/base/google-maps-drawable-overlay'; import { IGoogleMapsData, WrappedDataFunctions } from './i-google-maps-data'; import { IGoogleMapsFeature } from './feature/i-google-maps-feature'; import { FeatureTracker } from './services/feature-tracker'; /** Extends intellisense for `GoogleMapsData` with native data layer functions. */ export interface GoogleMapsData extends WrappedDataFunctions { } /** * The angular-ready wrapper for the native `google.maps.Data` class. * * @export * @class GoogleMapsData * @extends {GoogleMapsDrawableOverlay} * @implements {IGoogleMapsData} */ export declare class GoogleMapsData extends GoogleMapsDrawableOverlay implements IGoogleMapsData { /** * The tracker of geometry features currently added to the data layer. * */ readonly features: FeatureTracker; constructor(map: IGoogleMap, api: GoogleMapsApiService, native: google.maps.Data); getBounds(): google.maps.LatLngBounds; /** * Creates a marker geometry feature with the specified properties and adds it to the map. * * @param {Coord} position The position at which the marker should be added. * @param {google.maps.Data.FeatureOptions} [options] (Optional) Any native options to assign to the marker. * @returns {IGoogleMapsFeature} The wrapper object for the new feature. */ createMarker(position: Coord, options?: google.maps.Data.FeatureOptions): IGoogleMapsFeature; /** * Creates a polygon geometry feature with the specified properties and adds it to the map. * * @param {CoordPath} path The path describing the polygon coordinates. * @param {google.maps.Data.FeatureOptions} [options] (Optional) Any native options to assign to the polygon. * @returns {IGoogleMapsFeature} The wrapper object for the new feature. */ createPolygon(path: CoordPath, options?: google.maps.Data.FeatureOptions): IGoogleMapsFeature; /** * Creates a polyline geometry feature with the specified properties and adds it to the map. * * @param {Path} path The path describing the polyline coordinates. * @param {google.maps.Data.FeatureOptions} [options] (Optional) Any native options to assign to the polyline. * @returns {IGoogleMapsFeature} The wrapper object for the new feature. */ createPolyline(path: Path, options?: google.maps.Data.FeatureOptions): IGoogleMapsFeature; private buildOptions; /** * Adds a feature to the data layer. * * @param {IGoogleMapsFeature} feature The feature wrapper to add. * @returns {IGoogleMapsFeature} The wrapper object for the new feature. */ addFeature(feature: IGoogleMapsFeature): IGoogleMapsFeature; /** * Creates a wrapper object for the feature and adds it to the data layer. * * @param {(google.maps.Data.FeatureOptions | IGoogleMapsFeature)} feature The native feature or feature wrapper to add. * @returns {IGoogleMapsFeature} The wrapper object for the new feature. */ addFeature(options: google.maps.Data.FeatureOptions): IGoogleMapsFeature; /** * Removes a feature from the data layer. * * @param {google.maps.Data.Feature} feature The native feature to remove. * @returns {IGoogleMapsFeature} The removed feature wrapper or `null` if not found. */ removeFeature(feature: google.maps.Data.Feature): IGoogleMapsFeature; /** * Removes a feature from the data layer. * * @param {IGoogleMapsFeature} feature The feature to remove. * @returns {IGoogleMapsFeature} The removed feature wrapper or `null` if not found. */ removeFeature(feature: IGoogleMapsFeature): IGoogleMapsFeature; /** * Removes a feature from the data layer. * * @param {(number | string)} featureId The id of the feature to remove. * @returns {IGoogleMapsFeature} The removed feature wrapper or `null` if not found. */ removeFeature(featureId: string | number): IGoogleMapsFeature; /** * Looks for a feature in the data layer. * * @param {(string | number)} id The id of the feature to look for. * @returns {google.maps.Data.Feature} The feature associated with the specified id or `null` when not found. */ findFeature(id: string | number): google.maps.Data.Feature; /** * Creates the GeoJson representation of the data and provides it as an object when the promise resolves. * Will automatically take care of the callback required by Google Maps Api internally. * * @returns {Promise} A promise for the GeoJson object. */ toGeoJson(): Promise; /** * Downloads GeoJson data from the specified url, interprets it and creates map features for it. * Will automatically take care of the callback required by Google Maps Api internally. * @param {string} url The url to the GeoJson data to download. * @param {google.maps.Data.GeoJsonOptions} [options] (Optional) Configures the process of reading the GeoJson. * @returns {google.maps.Data.Feature[]} A promise for the features representing the geometries added from the GeoJson. */ loadGeoJson(url: string, options?: google.maps.Data.GeoJsonOptions): Promise; }