InfoPopup

ol-ishare/interaction/InfoPopup~ InfoPopup

Allows the user to view info in a popup by clicking on the map.

Constructor

new InfoPopup(opt_options)

InfoPopup interaction

Parameters:
Name Type Description
opt_options Object

Interaction options

Properties
Name Type Description
infoResultsToHtml function

Custom function to convert result features to HTML for display within the popup overlay

Methods

resultHandler(map, errors, infoLayers, featureCollections, coordinates)

Displays Popup containing query results and/or errors

Parameters:
Name Type Description
map ol/Map~Map

Map instance against which the query has been performed

errors Array.<(Error|null)>

Array containing either null (no error) or Error instance for each infoLayer (in the same order as infoLayers)

infoLayers Array.<ol/layer/Layer~Layer>

Info layers passed to infoResultsToHtml

featureCollections Array.<FeatureCollection>

OpenLayers FeatureCollections

coordinates Array.<Float>

Location queried

requestInfo(map, coordinates)

Requests info for all layers marked as displaying info and display popup at coordinates

Parameters:
Name Type Description
map ol/Map~Map

Map instance on which the popup will display

coordinates Array.<Float>

Location to query