Reference Source
public class | source

MapPopup

Extends:

leaflet~L.Popup → MapPopup

Used to open popups in certain places of the map.

Example:

var popup = new KQ.Map.MapPopup({
offset: new KQ.Struct.Point(0, -30),
});

popup.setLatLng(new KQ.Struct.LatLng(30, 104));
popup.setContent('Hello world!');
mapView.openPopup(popup);

Constructor Summary

Public Constructor
public

constructor(options: Object)

Constructor

Method Summary

Public Methods
public

addToMapView(mapview: MapView): Null

Add popup to mapview

public

remove(): Null

Removes the layer from the map it is currently active on.

public

setContent(htmlContent: String): Null

Sets the HTML content of the popup.

public

setLatLng(latlng: LatLng): Null

Sets the geographical point where the popup will open.

Public Constructors

public constructor(options: Object) source

Constructor

Params:

NameTypeAttributeDescription
options Object

config params

options.maxWidth Number

Max width of the popup, in pixels.

options.minWidth Number

Min width of the popup, in pixels.

options.maxHeight Number

If set, creates a scrollable container of the given height inside a popup if its content exceeds it.

Public Methods

public addToMapView(mapview: MapView): Null source

Add popup to mapview

Params:

NameTypeAttributeDescription
mapview MapView

mapview object

Return:

Null

public remove(): Null source

Removes the layer from the map it is currently active on.

Return:

Null

public setContent(htmlContent: String): Null source

Sets the HTML content of the popup.

Params:

NameTypeAttributeDescription
htmlContent String

html content

Return:

Null

public setLatLng(latlng: LatLng): Null source

Sets the geographical point where the popup will open.

Params:

NameTypeAttributeDescription
latlng LatLng

geographical point

Return:

Null