# vue+openlayer+echarts结合 **Repository Path**: tuwang1997/gis ## Basic Information - **Project Name**: vue+openlayer+echarts结合 - **Description**: openlayers以及echarts相关 - **Primary Language**: JavaScript - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-05-08 - **Last Updated**: 2024-07-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gistest ## 安装依赖 ``` npm install ``` ### 启动项目 ``` npm run serve ``` ### 在mock文件夹中运行如下命令,开启模拟数据服务 ``` json-server --watch --host 192.168.6.83 --port 321 data.json ``` ### 用tiles文件在tomcat或者nginx开启离线瓦片服务,并修改vue.config.js中的跨域配置 ```javascript proxy: { //配置跨域 "/gisapi": { target: "http://192.168.6.83:2020/", changOrigin: true, //允许跨域 pathRewrite: { "^/gisapi": "", }, }, "/api": { target: "http://192.168.6.83:321/", changOrigin: true, pathRewrite: { "^/api": "", }, }, }, ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/).