Class: GasStations

cercaliagl.control/GasStations


Javascript ES5

const control = new cercaliagl.control.GasStations();

Class cercaliagl.control.GasStations provides gas station POIs by around the world. Spain gas stations has more detailed information, these gas stations has the price of differents oils. POIs are drawn and grouped by zoom. Those are calculated on demand while user is panning on map.

To access to this control and enable it:

const map = new cercaliagl.Map({ target: 'map' });
const gasStationControl = map.getControlByName(cercaliagl.control.MapControls.GAS_STATIONS);
gasStationControl.enable();

new GasStations()

Extends

Methods

Close gas station UI popup

Disable gas station markers

Enable gas station markers

enableOption(option)

Name Type Description
option string

Option to enable. See above

Returns cercalia Map object

Returns:
Cercalia map.

getClass(){string} inherited

Get class name.

Returns:
Class name.

getElement(){Element} inherited

Get control HTML Element

Returns:
HTML Element

Get control id.

Returns:
Id.

getMap(){module:maplibre-gl~Map} inherited

Returns mapboxgl Map object

getName(){string|null} inherited

Get control name. Null if control has not defined name.

Returns:
Class name.

Hide control.

Show control.