/ui/locations/listview

The listview module exports the listview method as mapp.ui.locations.listview()

Methods

(inner) gazCheck(locale)

Hides the location view if a gazetteer is being interacted with. Clears the value of the gazetteer input. Controls whether the clear all button is shown by checking if any locations are selected.

Parameters:
NameTypeDescription
localelocale

(inner) listview(params)

Retrieves the locations pinstyle from locale.locations.pinStyle and generates the pin Appends the clear all button the location view which removes all locations from the view.

Creates a Proxy for params.mapview.locations which uses module:/ui/locations/listview~setRecord as its set method, further assigns a deleteProperty function which removes locations by removing the assigned hook from the record. The deleteProperty function also calls module:/ui/locations/listview~gazCheck

Parameters:
NameTypeDescription
paramsobject
Properties
NameTypeDescription
params.mapviewmapview

The mapview of the instance.

params.targetHTMLElement

The target for the listview.

(inner) setRecord(location)

Assign a record to selected location. A maximum of ten records is available by default. Selecting more than the max will generate an alert. Generates and applies the style of the location in the listview Creates the OlStyle for the pin associated to the location

Triggers the event to add the location to view. Prepends new locations to the listview, minimizing the other locations when a new one is selected

Parameters:
NameTypeDescription
locationlocation