摘要: view.on("click", (event) => { console.log(event.mapPoint.x); console.log(event.mapPoint.y); }); 阅读全文
posted @ 2021-07-27 10:53 maycpou 阅读(939) 评论(0) 推荐(0) 编辑
摘要: 我是在使用4.19.3这个版本的时候出现这个问题,其他版本未测试。 就是在设置MapView的center属性的时候,如果你使用的坐标系不是4326那么不能直接按照center:[xxx.xx,xx.xx]的格式设置。 需要先创建一个对应坐标系的点对象,再将这个点对象赋给center: let pt 阅读全文
posted @ 2021-07-27 10:47 maycpou 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 这个警告会在你加入图层的时候弹出。 原因是你图层中的数据的坐标超过了你设置的坐标系的范围。 这个警号不解决,会导致后续的一些分析报错,比如使用planarize lines打乱相交线的时候。 解决办法:就是选择合适的坐标系,包整你图层的元素处于你所选择的坐标系范围内。 阅读全文
posted @ 2021-07-25 17:47 maycpou 阅读(471) 评论(0) 推荐(0) 编辑
摘要: 1.provide用于在根组件中分享自己组件的变量,inject用于在所有根组件的子组件中注册使用根组件中分享出来的变量。 2.正常vue中使用provide和inject: 根组件: <script> export default { name:'root', data(){ return { n 阅读全文
posted @ 2021-07-21 09:01 maycpou 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 1.首先setup函数实在beforeCreated之前调用的。所以在setup中没有beforeCreated和created两个生命周期函数。 2.其他的生命周期函数在setup中使用的时候只需要在前面加上一个‘on’即可,如mounted的生命周期函数在setup中写为onMounted 3. 阅读全文
posted @ 2021-07-21 08:35 maycpou 阅读(303) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="home"> <button @click="a++">{{ a }}</button> <br /> <button @click="b++">{{ b }}</button> </div> </template> <script> import {  阅读全文
posted @ 2021-07-20 17:14 maycpou 阅读(462) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="home"> {{age}} <br> <button @click="add()">change</button> <br> {{nameAndAge}}//页面展示计算属性 </div> </template> <script> import{ref 阅读全文
posted @ 2021-07-20 16:40 maycpou 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 1.在setup中普通声明的变量,并返回时该变量不是响应式的,即改变该变量的值不会刷新页面。 <template> <div class="home"> {{num}} <br> <button @click="add()">change</button>//这里点击的时候在方法中即使改变了num的 阅读全文
posted @ 2021-07-11 11:15 maycpou 阅读(726) 评论(0) 推荐(0) 编辑
摘要: 在没有使用setup前的写法中,在methods的方法或者mounted的方法中我们可以用this来获取data数据调用一些方法之类的,this指向当前这个组件。 但是在setup中this是undefined的,因为setup方法的调用时机是在boforeCreated方法之前,也就是说在组件还没 阅读全文
posted @ 2021-07-06 18:28 maycpou 阅读(4264) 评论(0) 推荐(0) 编辑
摘要: 1.去掉地图边框。默认ui在点击地图后会有一个边框显示出来,且之后会一直存在。 去掉方法是加上样式: .esri-popup__inline-actions-container { display: none; } .esri-view .esri-view-surface--inset-outli 阅读全文
posted @ 2021-07-05 17:10 maycpou 阅读(1179) 评论(0) 推荐(0) 编辑