Skip to content
Andy Rothwell edited this page Aug 4, 2020 · 49 revisions

Welcome to the phila-vue-mapping (pvm) wiki!

What is phila-vue-mapping (@phila/vue-mapping in npmjs.com)?

phila-vue-mapping (pvm) is a library of vue components which can be used in any vue project. Many of these components wrap specific objects from Leaflet and Esri-Leaflet so that they can be used with vue.

pvm does not run code to initiate a Vue instance or Vuex store. It is basically just a bunch of unrelated .vue files. It also includes:

  • main.js – imports and exports all of the .vue files
  • store.js – creates and exports an object called ‘store’ which has some functions for using and storing data for the components
  • A util folder with 2 files specific to tasks:
    • svg-icon.js
    • triangle-icon.js
    • unique-id.js

In a project that USES pvm, you would:

  • In package.json add the dependency "@phila/vue-mapping": "2.0.5", or in index.html add:

      <script src=“//unpkg.com/@phila/[email protected]/dist/phila-vue-mapping.js></script>
    
  • Initiate the Vue instance and Vuex store, import the @phila/vue-mapping package, and use individual .vue components from it

Components

Mapbox:

Leaflet:

Esri-Leaflet:

Components:

Cyclomedia:

Pictometry:

The Store

Instructions for using the pvm Store are here

Future Work

Replacing Forked Dependencies

Check out more info about forked dependencies here