import { environment } from './../../../../environments/environment' ; import { GeoPosition , GeoLatLng , GeoBounds , PlaceSearchResult } from "../../../model/AppModels" ; import { Observable } from 'rxjs' ; export enum MappingAPI { GOOGLE_WEB = 1 , GOOGLE_NATIVE = 2 , LEAFLET = 3 , MAPBOX = 4 , MAPKIT_JS = 5 , MAPTILER = 6 } export type MapType = 'ROADMAP' | 'SATELLITE' ; export interface IMapProvider { mapAPIType : MappingAPI ; mapReady : boolean ; providerError : string ; initAPI ( ) ; initMap ( mapCanvasID , mapConfig , mapManagerContext ) ; refreshMapLayout ( ) ; renderMap ( poiList , mapHeight , parentContext ) ; clearMarkers ( ) ; getMapZoom ( ) : Observable < number > ; setMapZoom ( zoomLevel ) ; getMapCenter ( ) : Observable < GeoPosition > ; setMapCenter ( pos , zoomLevel ? ) ; setMapType ( mapType ) ; getMapBounds ( ) : Observable < Array < GeoLatLng > > ; moveToMapBounds ( bounds ) ; renderPolyline ( polyline ) ; clearPolyline ( ) ; focusMap ( ) ; unfocusMap ( ) ; placeSearch ( keyword , latitude ? , longitude ? ) : Promise < Array < PlaceSearchResult > > ; addPOILayer ( data ) ; } export class MapOptions { public enableClustering : boolean ; public resultBatchID : number ; public useMarkerIcons : boolean ; public useMarkerAnimation : boolean ; public enableTrackingMapCentre : boolean ; public enableSearchByWatchingLocation : boolean ; public mapCentre : GeoPosition ; public searchDistanceKM : number ; public iconSet : string ; public mapAPI : MappingAPI ; public mapMoveQueryRefreshMS : number ; public requestSearchUpdate : boolean ; public enableSearchRadiusIndicator : boolean ; public mapType : MapType ; public minZoomLevel : number ; public onMapMoveCompleted : any ; constructor constructor ( ) { this . enableClustering = false ; this . resultBatchID = - 1 ; this . useMarkerIcons = true ; this . useMarkerAnimation = true ; this . enableTrackingMapCentre = false ; this . enableSearchByWatchingLocation = false ; this . mapCentre = null ; this . mapAPI = environment . defaultMapProvider ; this . mapType = "ROADMAP" ; this . searchDistanceKM = 1000 * 100 ; this . mapMoveQueryRefreshMS = 300 ; this . enableSearchRadiusIndicator = false ; this . minZoomLevel = 2 ; } } export interface IMapManager { }