MapTooltip
Extends:
Used to display the prompt box on the map
Example:
var tooltip = new KQ.Map.MapTooltip({
offset: new KQ.Struct.Point(0, -30),
});
tooltip.setLatLng(new KQ.Struct.LatLng(30, 104));
tooltip.setContent('Hello world!');
mapView.openTooltip(tooltip);
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object) Constructor |
|
Method Summary
| Public Methods | ||
| public |
addToMapView(mapview: MapView): Null Add to mapview |
|
| public |
remove(): Null Remove from the map |
|
| public |
setContent(htmlContent: String): Null Set the content of html |
|
| public |
Set the geographic coordinates of the pop-up |
|
Public Constructors
public constructor(options: Object) source
Constructor
Params:
| Name | Type | Attribute | Description |
| options | Object | setting options |
|
| options.offset | Point | The offset distance of the prompt box, Point(0, 0) |
|
| options.direction | String | The direction of the prompt box appears, right, left, top, bottom, center, auto. |
|
| options.permanent | Boolean | Is fixed display. true or false |
|
| options.opacity | Number | Opacity 0~1 |
|
| options.className | String | Associate a custom CSS class |
Public Methods
public addToMapView(mapview: MapView): Null source
Add to mapview
Params:
| Name | Type | Attribute | Description |
| mapview | MapView | mapview object |
Return:
| Null |
Reference
Source