import {BGMapWrapper} from 'gisplay-es6-webpack/src/Gisplay/Maps/BGMapWrapper.js'
BGMapWrapper
This class represents a background map wrapper. Used to be a "middle-man" between the background map provider and the API.
Constructor Summary
Public Constructor | ||
public |
constructor(map: Object) This is the map that comes from the background map provider(e.g., MapBox). |
Member Summary
Public Members | ||
public |
loaderDiv: * |
|
public |
This is the map that comes from the background map provider(e.g., MapBox). |
Method Summary
Public Methods | ||
public |
createCanvas(id: number): HTMLCanvasElement Given one id it creates a canvas object. |
|
public |
Auxiliar method to be called when the we want to create the loader. |
|
public |
getContainer(): * Returns the map's containing HTML element. |
|
public |
getLatBound(): * Returns the latitude of the bounding box northwest corner. |
|
public |
getLngBound(): * Returns the longitude of the bounding box northwest corner. |
|
public |
getZoom(): * Returns the map's current zoom level. |
|
public |
loader() Creates loader to be shown at the beginning when the API is loading all data. |
|
public |
Adds a listener to a specified event type. |
Public Constructors
Public Members
public loaderDiv: * source
Public Methods
public createCanvas(id: number): HTMLCanvasElement source
Given one id it creates a canvas object.
Params:
Name | Type | Attribute | Description |
id | number | The id of the canvas to be created. |
Return:
HTMLCanvasElement | Canvas object where everything will be drawn. |
TODO:
- Understand case mapbox comment bellow.
public createLoader() source
Auxiliar method to be called when the we want to create the loader.
TODO:
- Probably it is not being used because nobody calls it(see L:82). It inserts two divs on the map
public getLngBound(): * source
Returns the longitude of the bounding box northwest corner.
Return:
* |
public loader() source
Creates loader to be shown at the beginning when the API is loading all data.
TODO:
- This method is calling another with parameters in the 1st if. This is incorrect.