Step 1. VUE project construction
Prerequisites
Before starting, please make sure you have completed Runtime Environment Installation and Node.js version >=18.
Steps
1. Install create-vue
Open command prompt
Method 1: Shortcut key win+r, enter cmd in the pop-up box, and click OK.

Method 2: Search cmd in the lower left corner of the screen and click to open it.

Run the following command to install
create-vuegloballynpm install -g @vue/cliAttentionIf you have previously installed the Vue CLI, the
create-vuecommand is already available.
2. Create a new project
Open the file path where you want to create a new project, enter cmd in the path bar, and click Enter.

Use the following command to create a new project. This command will create a new directory named
mapmost-vue-projectand initialize the project structure using Vue’s template.npm init vue@latest mapmost-vue-project
During the process of creating a project, create-vue will provide a series of configuration options that can be selected according to your project needs.
3. Open the project
Open VS Code
Drag the
mapmost-vue-projectfolder directly or open the folder in the upper left corner.
4. Install dependencies
In the terminal, enter the following command to install the project dependencies.
npm install
5. Start the project
In the terminal, enter the following command to start the project, and the project initial page will appear.
npm run dev

6. Install SDK
Add .npmrc file and configure the following content.
registry = "https://registry.npmjs.org/"
@mapmost:registry="https://npm.mapmost.com/"
In the terminal, enter the following command to install the SDK.
npm install @mapmost/mapmost-webgl
If the installation fails and an ETIMEDOUT or ECONNREFUSED error is displayed, you can change the .npmrc file to the following:
registry = "https://registry.npmmirror.com/"
@mapmost:registry="https://npm.mapmost.com/"
7. Introduce SDK
-Introduce SDK in src->main.js.
import mapmost from '@mapmost/mapmost-webgl';
window.mapmost = mapmost;
8. Develop applications
- Now we can start developing the Vue application in the src directory. We can add components, pages, and static resources and organize our code using Vue’s single-file components (.vue files).