You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template>
<slot></slot>
</template>
<script setup>
import { ref, onMounted, provide, defineExpose } from "vue";
import Vector3D from "ol-ext/layer/Render3D";
// Define props
const props = defineProps({
source: Object, // Data source (VectorSource)
style: Function, // Style function for the features
height: Function, // Function to determine the height of features
});
const layer = ref(null);
onMounted(() => {
// Create the Vector3D layer
layer.value = new Vector3D({
source: props.source,
styler: function (feature) {
// Pass the style function from props
return props.style ? props.style(feature) : null;
},
height: function (feature) {
// Pass the height function from props
return props.height ? props.height(feature) : 0;
},
});
// Define layer_ if necessary
layer.value.layer_ = layer.value;
// Provide the layer via provide for usage in other components
provide("vectorLayer", layer.value);
});
// Expose the layer for external use
defineExpose({
vectorLayer: layer,
});
</script>
The text was updated successfully, but these errors were encountered:
Hello,
I’m currently working with the ol-ext library in a Vue app and trying to display 3D features using the custom component from https://vue3openlayers.netlify.app/pluginsguide/ , but I’m unable to render any features on the map. I have followed the documentation and used Vector3DLayer, but the features do not appear in the 3D layer at all.
ol-ext example: https://github.com/Viglino/ol-ext/blob/master/examples/map/map.layer.3D.2.html
Vector3DLayer
The text was updated successfully, but these errors were encountered: