@amin-karimi/agm-direction
Version:
Angular Google Maps direction
77 lines (76 loc) • 3.65 kB
TypeScript
/// <reference types="googlemaps" />
/// <reference types="googlemaps" />
/// <reference types="googlemaps" />
/// <reference types="googlemaps" />
import { OnChanges, OnInit, EventEmitter, OnDestroy } from '@angular/core';
import { GoogleMapsAPIWrapper } from '@amin-karimi/agm-core';
import * as i0 from "@angular/core";
export declare class AgmDirection implements OnChanges, OnInit, OnDestroy {
private gmapsApi;
origin: string | google.maps.Place | google.maps.LatLng | google.maps.LatLngLiteral;
destination: string | google.maps.Place | google.maps.LatLng | google.maps.LatLngLiteral;
travelMode?: google.maps.TravelMode;
transitOptions?: google.maps.TransitOptions;
drivingOptions?: google.maps.DrivingOptions;
waypoints: google.maps.DirectionsWaypoint[];
optimizeWaypoints: boolean;
provideRouteAlternatives: boolean;
avoidHighways: boolean;
avoidTolls: boolean;
avoidFerries: boolean;
unitSystem?: google.maps.UnitSystem;
renderOptions?: google.maps.DirectionsRendererOptions;
panel?: Element;
markerOptions: {
origin: google.maps.MarkerOptions;
destination: google.maps.MarkerOptions;
waypoints?: google.maps.MarkerOptions;
};
infoWindow: google.maps.InfoWindow;
visible: boolean;
renderRoute?: google.maps.DirectionsResult | null;
onChange: EventEmitter<any>;
onResponse: EventEmitter<google.maps.DirectionsResult>;
sendInfoWindow: EventEmitter<google.maps.InfoWindow>;
status: EventEmitter<google.maps.DirectionsStatus>;
originDrag: EventEmitter<any>;
destinationDrag: EventEmitter<any>;
directionsService: google.maps.DirectionsService;
directionsRenderer: google.maps.DirectionsRenderer;
private originMarker?;
private destinationMarker?;
private waypointsMarker;
private isFirstChange;
constructor(gmapsApi: GoogleMapsAPIWrapper);
ngOnInit(): void;
ngOnChanges(obj: any): void;
ngOnDestroy(): void;
/**
* This event is fired when the user creating or updating this direction
*/
private directionDraw;
/**
* Custom Origin and Destination Icon
* @param map map
* @param marker marker
* @param markerOpts properties
* @param content marker's infowindow content
* @returns new marker
* @memberof AgmDirection
*/
private setMarker;
/**
* This event is fired when remove markers
*/
private removeMarkers;
/**
* This event is fired when remove directions
*/
private removeDirections;
/**
* This event is fired when destroy markers
*/
private destroyMarkers;
static ɵfac: i0.ɵɵFactoryDeclaration<AgmDirection, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<AgmDirection, "agm-direction", never, { "origin": "origin"; "destination": "destination"; "travelMode": "travelMode"; "transitOptions": "transitOptions"; "drivingOptions": "drivingOptions"; "waypoints": "waypoints"; "optimizeWaypoints": "optimizeWaypoints"; "provideRouteAlternatives": "provideRouteAlternatives"; "avoidHighways": "avoidHighways"; "avoidTolls": "avoidTolls"; "avoidFerries": "avoidFerries"; "unitSystem": "unitSystem"; "renderOptions": "renderOptions"; "panel": "panel"; "markerOptions": "markerOptions"; "infoWindow": "infoWindow"; "visible": "visible"; "renderRoute": "renderRoute"; }, { "onChange": "onChange"; "onResponse": "onResponse"; "sendInfoWindow": "sendInfoWindow"; "status": "status"; "originDrag": "originDrag"; "destinationDrag": "destinationDrag"; }, never, never, false>;
}