Reference Source
public class | source

MapPopup

Extends:

leaflet~L.Popup → MapPopup

用于在地图上弹出信息框

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)

构造函数

Method Summary

Public Methods
public

addToMapView(mapview: MapView): Null

添加到mapview

public

remove(): Null

从地图移除

public

setContent(htmlContent: String): Null

设置html内容

public

setLatLng(latlng: LatLng): Null

设置弹出框弹出的地理点坐标

Public Constructors

public constructor(options: Object) source

构造函数

Params:

NameTypeAttributeDescription
options Object

设置参数

options.maxWidth Number

弹出框的最大宽度,像素

options.minWidth Number

弹出框的最小宽度,像素

options.maxHeight Number

如果窗口的内容超过了它,在弹出窗口中将会出现滚动条

Public Methods

public addToMapView(mapview: MapView): Null source

添加到mapview

Params:

NameTypeAttributeDescription
mapview MapView

mapview对象

Return:

Null

public remove(): Null source

从地图移除

Return:

Null

public setContent(htmlContent: String): Null source

设置html内容

Params:

NameTypeAttributeDescription
htmlContent String

html内容

Return:

Null

public setLatLng(latlng: LatLng): Null source

设置弹出框弹出的地理点坐标

Params:

NameTypeAttributeDescription
latlng LatLng

地理点坐标

Return:

Null