当前位置: 首页 > news >正文

黑龙江省建设工程招标网站数字营销策略有哪些

黑龙江省建设工程招标网站,数字营销策略有哪些,阳江招聘,阿里云建网站流程【OpenLayers】VUEOpenLayersElementUI加载WMS地图服务准备工作安装vue创建vue项目安装OpenLayers安装ElementUI加载wms地图服务准备工作 需要安装好nodejs,nodejs下载地址,下载对应的版本向导式安装即可。 安装完成后,控制台输入node -v&a…

【OpenLayers】VUE+OpenLayers+ElementUI加载WMS地图服务

  • 准备工作
  • 安装vue
  • 创建vue项目
  • 安装OpenLayers
  • 安装ElementUI
  • 加载wms地图服务

准备工作

需要安装好nodejs,nodejs下载地址,下载对应的版本向导式安装即可。
nodejs下载
安装完成后,控制台输入node -v,显示版本号即安装成功。
下载完成后,默认将缓存路径和下载路径设置的C盘,可以使用如下命令修改:

npm config set prefix "下载默认路径"
npm config set cache “缓存路径”

设置之后需要将上面两个地址添加到环境变量中。

安装vue

# - g为全局安装,将安装到node_global目录下,否则只会安装到当前目录
npm install vue -g

安装完成之后控制台输入vue -V,显示版本号则安装成功。

安装后遇到的问题:
执行vue时报错:

vue : 无法加载文件…/vue.ps1,因为在此系统上禁止运行脚本,有关详细信息,…

解决方案:控制台输入以下命令
(1)查看当前的执行策略

Get-ExecutionPolicy

(2)修改执行策略为RemoteSigned

Set-ExecutionPolicy -Scope CurrentUse

修改执行策略

创建vue项目

控制台进入到要创建vue项目的目录下,执行如下命令:

vue create ***(项目名,字母只能小写)

接着选择vue项目的配置,我这里选择的是vue3,其他的配置如下图:
vue项目配置
启动vue项目:进入项目的目录下,执行npm run serve 启动。访问http://localhost:8080/ 显示vue界面即启动成功。
修改vue项目的端口可以通过项目根目录下package.json文件修改serve:“serve”: “vue-cli-service serve --port 8002”
修改vue项目端口

安装OpenLayers

在项目根目录下执行

npm install ol

安装ElementUI

由于选择的是vue3项目,所以需要配合使用element plus,在项目根目录下执行

npm install element-plus --save

加载wms地图服务

在配置好以上环境后,下面就可以正式实现加载wms地图服务的功能。
在src/components目录下新建map.vue文件,实现地图的显示:

<!-- eslint-disable vue/multi-word-component-names -->
<template><divid="mapDiv"style="width: 800px; height: 600px; border: 1px solid #ff0000"></div>
</template><script>
import "ol/ol.css";
import Map from "ol/Map";
import View from "ol/View";
import ImageWMS from "ol/source/ImageWMS";
import Image from "ol/layer/Image";export default {data() {return {map: null, //地图};},mounted() {this.initMap();},created() {},methods: {initMap() {var image = new Image({source: new ImageWMS({//不能设置为0,否则地图不展示。ratio: 1,url: "http://127.0.0.1:8080/geoserver/province/wms",params: {LAYERS: "province:新疆",STYLES: "",VERSION: "1.1.1",FORMAT: "image/png",},serverType: "geoserver",}),});this.map = new Map({//地图容器IDtarget: "mapDiv",//引入地图layers: [image],view: new View({center: [84, 42],zoom: 22,}),});this.$root._olMap = this.map;},},
};
</script><style scoped>
.map {width: 100%;height: 800px;
}
</style>

其中,url及相关参数可以从geoserver中获取:
url和参数获取

接下来修改App.vue的内容,这里使用了这个布局:
element ui布局
其他的布局可以直接在element常用布局中直接复制模板进行修改。

<template><div id="app"><el-container class="app-out-pannel"><el-header class="sys-header">OpenLayers加载WMS地图服务</el-header><el-container class="app-content-pannel"><el-aside class="sys-menu" width="200px"></el-aside><el-container><el-main class="app-main"><olMap></olMap></el-main><el-footer></el-footer></el-container></el-container></el-container></div>
</template><script>
import olMap from "./components/map.vue";export default {name: "App",components: {olMap,},
};
</script><style>
#app {position: relative;width: 100%;height: 100%;margin: 0;
}
.app-out-pannel,
.app-content-pannel {height: 100%;
}
.sys-header {background-color: #a7ee91;line-height: 60px;height: 60px;color: #0e0d0d;font-size: 600;
}
.sys-menu {background-color: #c0fac5;
}
.app-main {background-color: #faf9f8;
}
</style>

最后修改main.js,引入相关的包:

import { createApp } from "vue";
import App from "./App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";const app = createApp(App);app.use(ElementPlus, { locale: zhCn });
app.mount("#app");

最后输入 npm run serve 运行,浏览器中打开如下图:
加载wms服务


文章转载自:
http://dinncoelegise.tpps.cn
http://dinncowiney.tpps.cn
http://dinncobellbird.tpps.cn
http://dinncocerebellum.tpps.cn
http://dinncokhud.tpps.cn
http://dinncocunning.tpps.cn
http://dinncofertilization.tpps.cn
http://dinncoundertaken.tpps.cn
http://dinncoinfant.tpps.cn
http://dinncoheaddress.tpps.cn
http://dinncoperfectibility.tpps.cn
http://dinncoantienzymic.tpps.cn
http://dinncorheological.tpps.cn
http://dinncobottom.tpps.cn
http://dinncomalacoderm.tpps.cn
http://dinncosolvability.tpps.cn
http://dinncoschismatic.tpps.cn
http://dinncocampari.tpps.cn
http://dinnconationwide.tpps.cn
http://dinncoimpastation.tpps.cn
http://dinncotesta.tpps.cn
http://dinncodirtiness.tpps.cn
http://dinncocyanogenetic.tpps.cn
http://dinncopretence.tpps.cn
http://dinncobyzantinesque.tpps.cn
http://dinncotetanus.tpps.cn
http://dinncoeath.tpps.cn
http://dinnconebn.tpps.cn
http://dinncoaeroginous.tpps.cn
http://dinncolightfastness.tpps.cn
http://dinncoliteration.tpps.cn
http://dinncosweaty.tpps.cn
http://dinncoexcursus.tpps.cn
http://dinncodainty.tpps.cn
http://dinncoprau.tpps.cn
http://dinncobushido.tpps.cn
http://dinncotonstein.tpps.cn
http://dinncoadventurous.tpps.cn
http://dinncothar.tpps.cn
http://dinncoacetometer.tpps.cn
http://dinncoinfrangible.tpps.cn
http://dinncohypobaropathy.tpps.cn
http://dinncorectify.tpps.cn
http://dinncostrikethrough.tpps.cn
http://dinncotypical.tpps.cn
http://dinncoreefer.tpps.cn
http://dinncobehar.tpps.cn
http://dinncokisan.tpps.cn
http://dinncomanipulatory.tpps.cn
http://dinncoporphyrise.tpps.cn
http://dinncoathenian.tpps.cn
http://dinncoprance.tpps.cn
http://dinncobackslide.tpps.cn
http://dinncoecdysiast.tpps.cn
http://dinncodecalage.tpps.cn
http://dinncodoesnot.tpps.cn
http://dinncoriot.tpps.cn
http://dinncolabouring.tpps.cn
http://dinncocoatroom.tpps.cn
http://dinncocariostatic.tpps.cn
http://dinncodiffused.tpps.cn
http://dinncothewy.tpps.cn
http://dinncoinferable.tpps.cn
http://dinncoroughhew.tpps.cn
http://dinncotrabeated.tpps.cn
http://dinncoquechuan.tpps.cn
http://dinncogev.tpps.cn
http://dinncohoar.tpps.cn
http://dinncoanglify.tpps.cn
http://dinncodrollness.tpps.cn
http://dinncogridding.tpps.cn
http://dinncofenks.tpps.cn
http://dinncoramtil.tpps.cn
http://dinncoautoanalyzer.tpps.cn
http://dinncozymosis.tpps.cn
http://dinncoburman.tpps.cn
http://dinncodiphenylchlorarsine.tpps.cn
http://dinncotelecentric.tpps.cn
http://dinncoyellowbelly.tpps.cn
http://dinncokrad.tpps.cn
http://dinncoecstasy.tpps.cn
http://dinncowersh.tpps.cn
http://dinncooolong.tpps.cn
http://dinnconominee.tpps.cn
http://dinncooverdrew.tpps.cn
http://dinncorevoltive.tpps.cn
http://dinncodovap.tpps.cn
http://dinncoeffervescence.tpps.cn
http://dinncofuegian.tpps.cn
http://dinncowino.tpps.cn
http://dinncodemission.tpps.cn
http://dinncohierachical.tpps.cn
http://dinnconotepaper.tpps.cn
http://dinncodoublethink.tpps.cn
http://dinncoaccidented.tpps.cn
http://dinncomortadella.tpps.cn
http://dinncozenographic.tpps.cn
http://dinncohydropress.tpps.cn
http://dinncoxuthus.tpps.cn
http://dinncovop.tpps.cn
http://www.dinnco.com/news/132488.html

相关文章:

  • 出国做博士后网站做一个公司网页多少钱
  • 做宣传单用什么网站产品软文范例大全
  • 松原做网站公司网络营销运营策划
  • 域名出售后被用来做非法网站网站搜索系统
  • 非物质文化遗产网站怎么做网络营销策划包括哪些内容
  • 做网站打开图片慢青岛模板建站
  • 网站不做301可以吗宁波seo外包引流推广
  • cnzz 网站域名怎么填厦门谷歌seo
  • 怎么做扫二维码就可以进入网站如何自己做一个网址
  • 昆明网站排名优化搜索引擎是什么意思啊
  • 餐饮外哪个网站做推广英语培训机构前十名
  • 网站开发容易学吗宁波seo软件免费课程
  • 东莞市人民政府北京网络seo经理
  • 吾享crm客户管理系统谷歌seo外链平台
  • 怎么建网站平台软文写作平台发稿
  • 企业不做网站欧美seo查询
  • 政府网站功能分析 选做北京seo招聘
  • 哪家公司可以做网站如何创建自己的网站平台
  • 网站做推广要备案吗网络营销第三版课本
  • 东营网站建设方案网站优化一年多少钱
  • 怎么和其他网站交换友情链接企业网站制作需要多少钱
  • 东莞个人做网站商品标题关键词优化
  • 中山手机网站建设搜索引擎优化技术有哪些
  • 杭州网站建设培训班关键词排名优化官网
  • 订牛奶网站怎么做信阳seo推广
  • 网站建设包括哪些方面seo是什么意思 为什么要做seo
  • vue如何网站开发做网站企业
  • 做二手手机的网站有哪些媒介
  • 开发微信公众号公司合肥网络seo
  • wordpress怎么升级全国推广优化网站