EarthFrequencies / earth-frequencies-webui

Web interface for Earth Frequencies
2 stars 1 forks source link

Create Geo selector #19

Open ajmas opened 2 years ago

ajmas commented 2 years ago

Create a "geo selector" for choosing the region to display.

Behaviour:

We should look at using vue-leaflet for this and a geojson data file for the outlines, along with openstreetmaps for the base layer.

ajmas commented 2 years ago

Have started working on an initial version, but running into a performance issue whereby the UI freezes when rendering the map, with a 25 MB geojson file. Currently investigating how to deal with this issue. My current template code:

    <l-map
      v-else
      :zoom="zoom"
      :center="center"
      style="height: 100%; width: 100%"
    >
      <l-tile-layer
        :url="baseLayer.url"
        :attribution="baseLayer.attribution"
      />
      <l-geo-json
        :geojson="geojsonLayer.geojson"
        :options="geojsonLayer.options"
        :attribution="geojsonLayer.attribution"
        :options-style="geojsonLayer.styleFunction"
      />
    </l-map>

With the components being imported as:

import { LMap, LTileLayer, LGeoJson, Layer } from '@vue-leaflet/vue-leaflet';