Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.75 KB

File metadata and controls

69 lines (47 loc) · 1.75 KB

ol-profile-control

A profile control.

<script setup> import ProfileControlDemo from "@demos/ProfileControlDemo.vue" </script>

Usage

::: code-group

<<< ../../../../src/demos/ProfileControlDemo.vue

:::

Properties

Props from OpenLayers

Properties are passed-trough from ol-ext directly. Their types and default values can be checked-out in the official OpenLayers docs: ol-ext/control/Profile. Only some properties deviate caused by reserved keywords from Vue / HTML. This deviating props are described in the section below.

Deviating Properties

None.

Events

You have access to all Events from the underlying ol-ext Profile Control API (without the event: prefix). Check out the official OpenLayers docs to see the available events tht will be fired.

For example:

<ol-profile-control @over="handleOver" @out="handleOut" />

Methods

You have access to all Methods from the underlying ol-ext Profile Control API. Check out the official OpenLayers docs to see the available methods.

To access the source, you can use a ref() as shown below:

<template>
  <!-- ... -->
  <ol-profile-control ref="profileControlRef" />
  <!-- ... -->
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue";
import type Profile from "ol-ext/controls/Profile";

const profileControlRef = ref<{ control: Profile }>(null);

onMounted(() => {
  const profile: Profile = profileControlRef.value?.control;
  // call your method on `profile`
});
</script>