# Class default

Service for streetview functionality with Mapillary

#### Hierarchy

- StreetviewService
  - default

- Defined in src/streetview/MapillaryService.js:30

#####
Index

### Constructors

constructor

### Properties

Mapillary
handlePanoramaPositionChange_
map_
mapillaryElement
mapillaryEventHandler_
mly
noDataAtLocation
scope_

### Methods

extentToLonLat_
fromLonLat_
getPanorama
panoramaPositionChange
resize
toLonLat_
toggleShow

## Constructors

### constructor

- new default($scope, $timeout, $http, map, handlePanoramaPositionChange, accessToken, bufferSize): default

- #### Parameters

  - $scope: IScope

    Angular Scope.

  - $timeout: ITimeoutService

    Angular $timeout.

  - $http: IHttpService

    Angular $http service.

  - map: Map

    The map.

  - handlePanoramaPositionChange: ((newCoordinates) => void)

    Position change handler.

    - - (newCoordinates): void

      - #### Parameters

        - newCoordinates: Coordinate

        #### Returns void

  - accessToken: string

    The key to access the mapillary api.

  - bufferSize: number

    The size to add to the bbox buffer.

  #### Returns default

  #### Ng Inject

  Overrides StreetviewService.constructor

  - Defined in src/streetview/MapillaryService.js:41

## Properties

### Mapillary

Mapillary: {}

#### Type declaration

- Defined in src/streetview/MapillaryService.js:78

### handlePanoramaPositionChange_

handlePanoramaPositionChange_: ((newCoordinates) => void)

#### Type declaration

- - (newCoordinates): void

  - #### Parameters

    - newCoordinates: Coordinate

    #### Returns void

Inherited from StreetviewService.handlePanoramaPositionChange_

- Defined in src/streetview/Service.js:38

### map_

map_: Map

Inherited from StreetviewService.map_

- Defined in src/streetview/Service.js:37

### mapillaryElement

mapillaryElement: HTMLElement

Container of the mapillary viewer.

- Defined in src/streetview/MapillaryService.js:74

### mapillaryEventHandler_

mapillaryEventHandler_: ((evt) => void)

#### Type declaration

- - (evt): void

  - #### Parameters

    - evt: ViewerImageEvent

    #### Returns void

- Defined in src/streetview/MapillaryService.js:98

### mly

mly: Viewer

- Defined in src/streetview/MapillaryService.js:80

### noDataAtLocation

noDataAtLocation: boolean

Inherited from StreetviewService.noDataAtLocation

- Defined in src/streetview/MapillaryService.js:145
- Defined in src/streetview/MapillaryService.js:149

### scope_

scope_: IScope

Inherited from StreetviewService.scope_

- Defined in src/streetview/Service.js:36

## Methods

### extentToLonLat_

- extentToLonLat_(extent): Extent

- #### Parameters

  - extent: Extent

    Extent in EPSG:2056 to reproject.

  #### Returns Extent

  LonLat extent.

  Inherited from StreetviewService.extentToLonLat_

  - Defined in src/streetview/Service.js:93

### fromLonLat_

- fromLonLat_(lonLat): Coordinate

- #### Parameters

  - lonLat: Coordinate

    LonLat coordinate.

  #### Returns Coordinate

  Map view projection coordinate.

  Inherited from StreetviewService.fromLonLat_

  - Defined in src/streetview/Service.js:71

### getPanorama

- getPanorama(coordinates): void

- Get image for the given location.

  #### Parameters

  - coordinates: Coordinate

    Map view projection coordinates.

  #### Returns void

  Overrides StreetviewService.getPanorama

  - Defined in src/streetview/MapillaryService.js:122

### panoramaPositionChange

- panoramaPositionChange(newCoordinates): void

- Set new position on the map.

  #### Parameters

  - newCoordinates: Coordinate

    array of longitude and latitude.

  #### Returns void

  Inherited from StreetviewService.panoramaPositionChange

  - Defined in src/streetview/Service.js:61

### resize

- resize(): void

- Resize the image.

  #### Returns void

  - Defined in src/streetview/MapillaryService.js:109

### toLonLat_

- toLonLat_(coordinate): Coordinate

- #### Parameters

  - coordinate: Coordinate

    Map view projection coordinate.

  #### Returns Coordinate

  LonLat coordinate.

  Inherited from StreetviewService.toLonLat_

  - Defined in src/streetview/Service.js:82

### toggleShow

- toggleShow(show): void

- Toggle visibility of streetview / add or remove its event handler

  #### Parameters

  - show: boolean

    If the streetview is to show

  #### Returns void

  Overrides StreetviewService.toggleShow

  - Defined in src/streetview/MapillaryService.js:159