<script setup> import ProfileControlDemo from "@demos/ProfileControlDemo.vue" </script>A profile control.
::: code-group
<<< ../../../../src/demos/ProfileControlDemo.vue
:::
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.
None.
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" />
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>