Map control using Vue and OpenLayers
npm install rrwvuemapnpm create vue@latest vue-map-library.
npm run dev.
npm run build to compile for distribution.
npm run test:unit to run tests.
npm run lint to show any compiler and syntax errors.
createWebHashHistory instead of default createWebHistory in the Router definition page.
"rrwvuemap": "file:../VueMapLibrary" instead of "rrwvuemap: "?.?.?" in the dependencies section of the package.json file to load the package with reference to a file. Run npm install afterwards to update it.
npm link in the terminal of this library.
npm link rrwvuemap in the terminal of the consuming NodeJS project.
npm unlink rrwvuemap in the terminal of the consuming NodeJS project.
npm adduser.
npm version patch to increment the version, then run npm publish to publish it. Your browser will need to be logged in to https://registry.npmjs.org/ in order to do this. It will prompt you to do so if you are not logged in. It authorises your PC against the profile.
npm install rrwvuemap for a final version or link the methods mentioned above for debugging.
import { MapComponent } from "rrwvuemap";
`
Release Notes
$3
- MapComponent is the only exported component at the moment.
- It has a single map layer: Open Street Map.
- It has a single projection, default projection Web Mercator, EPSG 3857.
- Input properties for MapComponent are:
- Longitude and latitude for initial center point. This will facilitate geolocation by the consuming application.
- Height, in pixels or calculated pixels (calc() method in stylesheets).
- Initial zoom level.
- Scalebar control, not confugurable.
- Incorporation of stylesheets from Open Layers (ol.css).
- Added new event: map-extent-changed.
- Added new event: map-cursor-move.
$3
- Renamed MapComponent to MapControl.
- Added StatusbarControl control.
- Added IntegratedControl that replaces MapControl as the exported control.
- Modified emitted events to be:
- view-changed
- map-cursor-move
- map-loaded
- Added many props to the IntegratedControl regarding the status bar.
$3
- Changed many props into one big structure.
- Exporting types and components in export.ts file.
- Cache layers in a singleton service for re-use by map when it is re-created.
- Added first hardcoded feature layer.
- Re-introduced map width property.
- Re-distributed code into services.
- Removed IntegratedControl; all controls inside map.
- Added buttonbar, ButtonbarControl`, and geolocation button.