上一页 1 2 3 4 5 6 7 8 9 10 ··· 35 下一页

地图坐标的转换

摘要: 需要引入的类为 import {transform, transformExtent, fromLonLat} from "ol/proj"; view中进行坐标的转换 var view = new View({ projection: "EPSG:3857", //使用这个坐标系 center: 阅读全文
posted @ 2021-08-26 10:31 一往无前! 阅读(167) 评论(0) 推荐(0) 编辑

FeatureLayer图层的属性查询方式(query的使用方法)

摘要: 以csvLayer为例: view .whenLayerView(csvLayer) .then(function(csvLayerView) { const queryStations = csvLayerView.createQuery(); queryStations.where = "sta 阅读全文
posted @ 2021-08-26 09:43 一往无前! 阅读(248) 评论(0) 推荐(0) 编辑

使用LayerView.effect进行点的高亮显示

摘要: 通过设置一个按钮事件通过,设置一个简单的查询条件,对查找到的元素进行高亮显示,对于其他元素进行遮盖处理。 const btn = document.getElementById("btn"); btn.addEventListener("click",function(){ view .whenLa 阅读全文
posted @ 2021-08-25 18:07 一往无前! 阅读(39) 评论(0) 推荐(0) 编辑

获取图层中的属性值

摘要: Arcgis api for js从图层中获取字段的值 function getGraphics(response) { // the topmost graphic from the hurricanesLayer // and display select attribute values fr 阅读全文
posted @ 2021-08-20 18:06 一往无前! 阅读(128) 评论(0) 推荐(0) 编辑

设置sceneView的背景

摘要: 设置sceneView的背景 const view = new SceneView({ container: "viewDiv", map: map, //高亮显示选中的图层 highlightOptions: { haloOpacity: 0 }, environment: { //设置背景 ba 阅读全文
posted @ 2021-08-20 18:04 一往无前! 阅读(156) 评论(0) 推荐(0) 编辑

arcgis api中save map

摘要: 保存地图 需要引入的模块: import WebMap from "@arcgis/core/WebMap"; 首先声明一个webmap,引入底图 const webmap = new WebMap({ portalItem: { // autocasts as new PortalItem() i 阅读全文
posted @ 2021-08-20 18:03 一往无前! 阅读(115) 评论(0) 推荐(0) 编辑

render的使用方法

摘要: const seattleLayer = new FeatureLayer({ url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Puget_Sound_BG_demographics/FeatureSer 阅读全文
posted @ 2021-08-20 17:57 一往无前! 阅读(45) 评论(0) 推荐(0) 编辑

js对整个div进行侦听,并通过设定值判断是哪个按钮的点击事件

摘要: 其中.btns代表在总体的div中定义的class类data-id为在button中定义的标记字符 <div class="btns"> <div class="btn-switch active-map" data-id="0">1</div> <div class="btn-switch" da 阅读全文
posted @ 2021-08-20 17:54 一往无前! 阅读(412) 评论(0) 推荐(0) 编辑

arcgis中goto的用法

摘要: 1.默认方式(在进行定位导航操作时不设置任何动画) shiftCamera(60)代表旋转60度如果需要跳转至指定位置,即可将注释部分放入到goto语句中。下面都是类似的 document.getElementById("default").addEventListener("click", ()  阅读全文
posted @ 2021-08-20 17:53 一往无前! 阅读(377) 评论(0) 推荐(0) 编辑

select的change监听事件

摘要: 对于一些事件,需要直接选择select中的选项做出事件,而不需要单独提交,这就需要设置select的侦听事件 首先在html中创建select工具 <select id="projectID" > <option value="8857" selected>8857</option> <option 阅读全文
posted @ 2021-08-20 17:50 一往无前! 阅读(1886) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 35 下一页