MelihAltintas / vue3-openlayers

Web map Vue 3.x components with the power of OpenLayers
https://vue3openlayers.netlify.app/
MIT License
629 stars 120 forks source link

Export packages in child path #331

Open d-koppenhagen opened 2 months ago

d-koppenhagen commented 2 months ago

Currently we have to:

<script setup lang="ts">
import { Map, Layers, Sources } from 'vue3-openlayers'
</script>

<template>
  <Map.OlMap style="min-width: 400px; min-height: 400px">
    <Map.OlView :center="[40, 40]" :zoom="5" projection="EPSG:4326" />
    <Layers.OlTileLayer>
      <Sources.OlSourceOSM />
    </Layers.OlTileLayer>
  </Map.OlMap>
</template>

It should be siplified like this:

<script setup lang="ts">
import { OlMap, OlView } from 'vue3-openlayers/Map'
import { OlTileLayer } from 'vue3-openlayers/Layers'
import { OlSourceOSM } from 'vue3-openlayers/Sources'
</script>

<template>
  <OlMap style="min-width: 400px; min-height: 400px">
    <OlView :center="[40, 40]" :zoom="5" projection="EPSG:4326" />
    <OlTileLayer>
      <OlSourceOSM />
    </OlTileLayer>
  </OlMap>
</template>