krite-vue
Vue components for krite map applications.
Dependencies
Unlike krite itself this project is opinionated and relies on two main dependencies
- Bulmalite for bulma vue components
- Material design icons
Usage
Vue plugin
Krite-vue includes a vue plugin that binds a single krite instance to your vue application. This makes the map state available to all components in your webapp.
;; // Register the pluginVue; const krite = ; // Configure krite instance... // Add the krite instance to the component optionsconst app = el: '#app' krite ...
A reference to the krite instance is now available in your view models
const component = methods: { this$kritemap; } ...;
Components
Register krite-vue components to use them in your webapp
;; const component = components: kriteMap: MapComponent kriteLegend: LegendComponent ...;
Development
Krite-vue is developed using typescript. View models are class style and contained in a seperate .ts file.
Compile the typescript files with either tsc -d
, tsc -d -w
or npm run dev
. To transfer the .vue template files from /src to /lib you can use the included script by running npm run collect
.