Closed itsgifnotjiff closed 3 years ago
Hello @itsgifnotjiff , here is a simple demo https://codesandbox.io/s/vuelayers-plotly-11d5l?fontsize=14&hidenavigation=1&theme=dark.
I'm not a big expert with vue-plotly/plotly, so I just use simplest example from readme. In your case I guess you need to additionally load some graph data and you can make this in the created/mounted hooks of the Plot
component.
This is a great starting point sir and thank you very much but is my understanding correct that the vl-source-vector must be a promise and if that is true is there a way I can load from a GeoJSON in assets? Also a general question about the VueLayers library, seeing it is a thin wrapper of OpenLayers, could I install OpenLayers and use modules from OL such say their GeoJSON function from ol/format/GeoJSON?
is there a way I can load from a GeoJSON in assets?
features
prop.<template>
<vl-source-vector :features="geojsonFeatures" />
</template>
<script>
import featuresCollection from '/path/to/assets/my_features.geojson'
export default {
data () {
return {
geojsonFeatures: featuresCollection.features.slice(),
}
},
}
</script>
<template>
<vl-source-vector url="//example.com/my_geojson_features" :features.sync="geojsonFeatures" />
</template>
<script>
export default {
data () {
return {
geojsonFeatures: [],
}
},
}
</script>
could I install OpenLayers and use modules from OL such say their GeoJSON function from ol/format/GeoJSON?
OpenLayers already installed with VueLayers, so you can import/use anything from the ol
package.
If you want to fix ol
package in your package.json dependencies, sure you can run :
npm install ol@5
.npm install ol@6
I am trying to create a component that features a map with points on it (from a csv ideally) that will display a Plotly popup containing a graph based on the point selected. I am not sure where to start and would really appreciate if someone can help with a codepen. I have been able to that using Folium and python scripting but the Vue/Vuelayers/Vueplotly combo has got me at a lost.