vue
hjh811
这个作者很懒,什么都没留下…
展开
-
vue-openlayers系列(1):Control组件仿arcgis4个角布局
arcgis JavaScript api的组件top-left,top-right,bottom-left,bottom-right布局这种方式比较方便,在openlayers不能指定control的具体位置,需要通过重新css或者element来控制。这里参考arcgis的思路实现组件的在4个方位摆放。首先定义4个div,与map平级<div id="top-left" class="top-left"></div><div id="top-right" cla原创 2021-09-13 17:33:45 · 388 阅读 · 0 评论 -
Vue-leaflet系列(3):使用esri-leaflet-renderers加载featurelayer要素服务的符号
如果使用leaflet的marker加载图片的方式来渲染的featurelayer的符号,存在一定性能问题。而且featurelayer在发布服务的已经定义好符号,是否可以直接featurelayer的符号?答案是可以的。通过esri-leaflet-renderers插件加载。 esri-leaflet-renderers官方的例子都是通过script标签引入,这里使用vue,要使用import的方式来实现。npm install --save esri-leafle...原创 2021-09-09 17:52:17 · 997 阅读 · 0 评论 -
Vue-leaflet系列(2):解决esri-leaflet的attribution覆盖
L.control.attribution({prefix: ''}).addTo(map)通过leaflet自定义的版权信息,却在调用esri-leaflet加载相关layer会被覆盖attribution信息。通过阅读源码可以esri-leaflet的attribution在Util.js在每个layer定义都有引入Uitl,如Featurelayer.js找到Util.js的关键代码,注释掉这一行即可// map.attributionControl.setPr...原创 2021-09-09 15:03:13 · 460 阅读 · 0 评论 -
Vue-leaflet系列(1):Vue加载esri-leaflet按需引入方式
首先npm安装Leafletnpm install esri-leaflet --save其次引入esri-leafletimport L from 'leaflet'var esri = require("esri-leaflet");var esri = require("esri-leaflet");是网上大部分代码的引入方式,这样引入方式没问题,却增加Vue代码编译体积。正确引入方式是用到那个类再import那个,这样引入js文件更少,体积更少,而且方便对日后需要对源代码原创 2021-09-09 14:40:04 · 1617 阅读 · 0 评论 -
Vue通过脚本动态加载自定义组件
很多时候需要脚本的方式动态加载自定义组件,代码列子如下 const my-comoponent = () => import('../components/my-comoponent.vue') var toolborVM = new Vue({ template: '<my-comoponent:toolData="toolData"></my-comoponent>', components: {原创 2021-08-23 16:06:46 · 1091 阅读 · 0 评论 -
Vue MPA多页面应用取消prefetch和preload
vue.config.js配置 chainWebpack: config => { config.plugins.delete("prefetch-index") config.plugins.delete('preload-index') }这里的prefetch-index要与vue.config.js的多页面pages设置要一致build结束查看dist输出的index文件不包括prefetch和preload的link rel引用..原创 2021-08-23 15:55:34 · 1758 阅读 · 0 评论 -
基于vue实现arcgis javascript的playground(一)
官方的playground例子不错,但是有不少问题:1、symbol输出的json不能直接autocast,存在type不一致问题;2、未提供交互的接口,没有可以其他程序调用返回的获取的方式,虽然能改造,工程量极大;3、非Vue实现(这不算问题,但对于Vue开发者来说是问题)基于上述原因,基于Vue3、element-plus和arcgis javascript 4.20的api去实现playground的功能,先上图如下目前已实现功能如下:1、支持SimpleMar.原创 2021-08-09 17:35:37 · 474 阅读 · 0 评论 -
webassembly例子 add is not a function问题
参考网上列子https://www.cnblogs.com/y-y-y-y/p/9897154.html?ivk_sa=1024320u本人使用vue的方式去实现奈何执行到add方式提示add is not a function,百原创 2021-07-27 11:26:03 · 1430 阅读 · 1 评论