VPopup

Popup Class.

<v-popup
  :center="center"
  :options="options"
>
  popup content
</v-popup>

Examples

With Popup In Map

With Chart in Popup

A popup window is implemented in mapbox-gl by instantiating new Popup and executing the setHtml method, inserting html text. For Canvas charts, it must be operated with javascript, so a chart library that supports the SVG rendering mode is required, such as EChart.

For example, when using EChart, you need to pass in the renderer: 'svg' parameter in the init method.

const chart = echarts.init(dom, null, {
  width: 400,
  height: 400,
  renderer: "svg",
});

property

propertyrequiredtypedescription
visibletruebooleanvisibility, using v-model:visible for auto updating visible.
centerfalsenumber[]Popup's lngLat
optionsfalseobjectPopup's options

for more details you can access to mapbox website, go toopen in new window

event

eventdescription
update:visibleemit update:visible event in using v-model:visible prop.

Slot

namedescription
defaultdefault
Last Updated:
Contributors: timeroute, chinesejar