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

龙华app网站制作电商网站如何避免客户信息泄露

龙华app网站制作,电商网站如何避免客户信息泄露,免费舆情网站下载,深圳网页设计师招聘文章目录 0.引言1.前端代码编辑工具2.使用ArcgisForJs创建一个简单应用3.切片地图服务图层4.动态地图服务图层5.地图事件 0.引言 ArcGIS API for JavaScript是一款由Esri公司开发的用于创建WebGIS应用的JavaScript库。它允许开发者通过调用ArcGIS Server的REST API&#xff0c…

文章目录

  • 0.引言
  • 1.前端代码编辑工具
  • 2.使用ArcgisForJs创建一个简单应用
  • 3.切片地图服务图层
  • 4.动态地图服务图层
  • 5.地图事件

0.引言

ArcGIS API for JavaScript是一款由Esri公司开发的用于创建WebGIS应用的JavaScript库。它允许开发者通过调用ArcGIS Server的REST API,将地图资源和其它资源(如ArcGIS Online)嵌入到Web应用中。ArcGIS API for JavaScript提供了丰富的功能,包括页面布局、地图图层、空间坐标转换、要素符号、专题图、属性查询、空间分析、三维场景、小部件、渲染器等。本文介绍如何快速入门ArcgisForJs。

1.前端代码编辑工具

(1)ArcgisForJs沙盒
ArcgisForJs的代码编写和测试在沙盒中进行。
ArcgisForJs沙盒可以访问: https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=map_create
  在这里插入图片描述
(2)代码笔
CodePen(代码笔)一款前端所见即所得的工具,我们可以在线编辑制作前端页面,所见即所得。同时网站提供所有常见的 js、css 库,并且支持流行技术(如 SASS),免去了我们自建平台的麻烦。编辑器网址: https://codepen.io/pen/
  在这里插入图片描述

2.使用ArcgisForJs创建一个简单应用

创建任何GIS地图应用程序,都需要遵循一些步骤。假如想让地图成为应用程序的一部分,那么就需要按照这些步骤来执行。需要遵循以下步骤:①创建页面HTML代码;②引用ArcGIS API for JavaScript和样式表;③加载模块;④确保DOM可用;⑤创建地图;⑥定义页面内容;⑦页面样式。
(1)主要代码

<!DOCTYPE html>
<html>  
<head>  <title>Create a Map</title>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">  <link rel="stylesheet" href="https://js.arcgis.com/3.45/dijit/themes/claro/claro.css">  <link rel="stylesheet" href="https://js.arcgis.com/3.45/esri/css/esri.css">  <style>  html, body, #mapDiv {  padding: 0;  margin: 0;  height: 100%;  }  </style>  <script src="https://js.arcgis.com/3.45/"></script>  <script>  dojo.require("esri.map");  function init(){  var map = new esri.Map("mapDiv", {  basemap: "topo-vector",  center: [-122.45, 37.75],  zoom: 13  });  }  dojo.ready(init);  </script>  </head>  
<body class="claro">  <div id="mapDiv"></div>  
</body>  
</html>

(2)结果显示
  在这里插入图片描述

3.切片地图服务图层

ArcGISTiledMapServiceLayer类使用在当引用ArcGIS Server暴露的切片(缓存)地图服务时。这种类型的对象使用已经缓存过的切片地图集合,所以性能得以改善。
(1)主要代码

<!DOCTYPE html>
<html>  <head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">  <title>Tiled map service</title>  <link rel="stylesheet" href="https://js.arcgis.com/3.45/esri/css/esri.css">  <style>  html, body, #map {  height: 100%; width: 100%; margin: 0; padding: 0;  }  </style>  <script src="https://js.arcgis.com/3.45/"></script>  <script>  var map;  require(["esri/map",  "esri/layers/ArcGISTiledMapServiceLayer",  "esri/geometry/Point",  "esri/SpatialReference",  "dojo/domReady!"],  function(Map, ArcGISTiledMapServiceLayer, Point, SpatialReference) {  map = new Map("map", {  center: new Point(1714791.187457787, 2194882.166227445, new SpatialReference({ wkid: 5936 }))  });  var tiled = new ArcGISTiledMapServiceLayer("https://services.arcgisonline.com/arcgis/rest/services/Polar/Arctic_Imagery/MapServer");  map.addLayer(tiled);  }  );  </script>  </head>  <body>  <div id="map"></div>  </body>  
</html>

(2)结果显示
  在这里插入图片描述

4.动态地图服务图层

ArcGISDynamicMapService类用来动态创建ArcGIS Server地图服务。
(1)主要代码

<!DOCTYPE html>
<html>  <head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">  <title>Create Map and add a dynamic layer</title>  <link rel="stylesheet" href="https://js.arcgis.com/3.45/esri/css/esri.css"/>  <style>  html, body, #mapDiv{  padding: 0;  margin: 0;  height: 100%;  }  </style>  <script src="https://js.arcgis.com/3.45/"></script>  <script>  var map;  require([  "esri/map",  "esri/layers/ArcGISDynamicMapServiceLayer",  "esri/layers/ImageParameters"  ], function (  Map, ArcGISDynamicMapServiceLayer, ImageParameters) {  map = new Map("mapDiv", {  sliderOrientation : "horizontal"  });  var imageParameters = new ImageParameters();  imageParameters.format = "jpeg"; // default is PNG8.  //Takes a URL to a non cached map service.  var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer", {  "imageParameters" : imageParameters  });  map.addLayer(dynamicMapServiceLayer);  });  </script>  </head>  <body>  <div id="mapDiv"></div>  </body>  
</html>

(2)结果显示
  在这里插入图片描述

5.地图事件

在编程世界里,事件是发生在应用程序中的动作。通常,这些事件通过终端用户触发,包括鼠标单击、鼠标拖拽和键盘动作,但是它还包括数据的发送和接收、组件修改和其他操作。
(1)主要代码

<!DOCTYPE html>
<html>  <head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">  <title>Select with feature layer</title>  <link rel="stylesheet" href="https://js.arcgis.com/3.45/dijit/themes/tundra/tundra.css">  <link rel="stylesheet" href="https://js.arcgis.com/3.45/esri/css/esri.css">  <style>  html, body, #mapDiv {  padding: 0;  margin: 0;  height: 100%;  }  #messages{  background-color: #fff;  box-shadow: 0 0 5px #888;  font-size: 1.1em;  max-width: 15em;  padding: 0.5em;  position: absolute;  right: 20px;  top: 20px;  z-index: 40;  }  </style>  <script src="https://js.arcgis.com/3.45/"></script>  <script>  var map;  require([  "esri/map", "esri/layers/FeatureLayer",  "esri/tasks/query", "esri/geometry/Circle",  "esri/graphic", "esri/symbols/SimpleMarkerSymbol",  "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/renderers/SimpleRenderer",  "esri/config", "esri/Color", "dojo/dom", "dojo/domReady!"  ], function(  Map, FeatureLayer,  Query, Circle,  Graphic, SimpleMarkerSymbol,  SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer,  esriConfig, Color, dom  ) {  map = new Map("mapDiv", {  basemap: "streets-vector",  center: [-95.249, 38.954],  zoom: 14,  slider: false  });  // Add the census block points in on demand mode. An outfield is specified since it is used when calculating   the total population falling within the one mile radius.  var featureLayer = new FeatureLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/0",{  outFields: ["POP2000"]  });  // Selection symbol used to draw the selected census block points within the buffer polygon  var symbol = new SimpleMarkerSymbol(  SimpleMarkerSymbol.STYLE_CIRCLE,  12,  new SimpleLineSymbol(  SimpleLineSymbol.STYLE_NULL,  new Color([247, 34, 101, 0.9]),  1  ),  new Color([207, 34, 171, 0.5])  );  featureLayer.setSelectionSymbol(symbol);  // Make unselected features invisible  var nullSymbol = new SimpleMarkerSymbol().setSize(0);  featureLayer.setRenderer(new SimpleRenderer(nullSymbol));  map.addLayer(featureLayer);  var circleSymb = new SimpleFillSymbol(  SimpleFillSymbol.STYLE_NULL,  new SimpleLineSymbol(  SimpleLineSymbol.STYLE_SHORTDASHDOTDOT,  new Color([105, 105, 105]),  2  ), new Color([255, 255, 0, 0.25])  );  var circle;  // When the map is clicked create a buffer around the click point of the specified distance  map.on("click", function(evt){  circle = new Circle({  center: evt.mapPoint,  geodesic: true,  radius: 1,  radiusUnit: "esriMiles"  });  map.graphics.clear();  var graphic = new Graphic(circle, circleSymb);  map.graphics.add(graphic);  var query = new Query();  query.geometry = circle.getExtent();  // Use a fast bounding box query. It will only go to the server if bounding box is outside of the visible map.  featureLayer.queryFeatures(query, selectInBuffer);  });  function selectInBuffer(response){  var feature;  var features = response.features;  var inBuffer = [];  // Filter out features that are not actually in buffer, since we got all points in the buffer's bounding box  for (var i = 0; i < features.length; i++) {  feature = features[i];  if(circle.contains(feature.geometry)){  inBuffer.push(feature.attributes[featureLayer.objectIdField]);  }  }  var query = new Query();  query.objectIds = inBuffer;  // Use an objectIds selection query (should not need to go to the server)  featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function(results){  var totalPopulation = sumPopulation(results);  var r = "";  r = "<b>The total Census Block population within the buffer is <i>" + totalPopulation + "</i>.</b>";  dom.byId("messages").innerHTML = r;  });  }  function sumPopulation(features) {  var popTotal = 0;  for (var x = 0; x < features.length; x++) {  popTotal = popTotal + features[x].attributes["POP2000"];  }  return popTotal;  }  });  </script>  </head>  <body>  <span id="messages">Click on the map to select census block points within 1 mile.</span>  <div id="mapDiv"></div>  </body>  
</html>

(2)结果显示
  在这里插入图片描述

参考资料:
[1] 派普勒[著]张大伟[译]. 《JavaScript构建Web和ArcGIS Server应用实战》; 2015-12-01 [accessed 2024-01-28].
[2] hangge. CodePen - 一个在线的前端代码编辑工具(可用于制作测试页面、代码调试); 2019-12-02 [accessed 2024-01-28].
[3] . ArcGIS Maps SDK for JavaScript; [accessed 2024-01-28].
[4] . ArcGIS API for JavaScript (legacy) 3.45; [accessed 2024-01-28].
[5] 祥哥哥咩~. arcgis for js图层graphic的鼠标悬浮事件; 2019-04-26 [accessed 2024-01-28].


文章转载自:
http://dinncogallanilide.stkw.cn
http://dinncoartfully.stkw.cn
http://dinncofrumpish.stkw.cn
http://dinncoulminic.stkw.cn
http://dinncotrommel.stkw.cn
http://dinncoflutist.stkw.cn
http://dinncoliterator.stkw.cn
http://dinncoshillingsworth.stkw.cn
http://dinncopdq.stkw.cn
http://dinncopolygene.stkw.cn
http://dinncoperforming.stkw.cn
http://dinncorimbaldian.stkw.cn
http://dinncodblclick.stkw.cn
http://dinncozookeeper.stkw.cn
http://dinncobrutalism.stkw.cn
http://dinncolegume.stkw.cn
http://dinncooary.stkw.cn
http://dinncosurgeon.stkw.cn
http://dinncolepra.stkw.cn
http://dinncowarehouseman.stkw.cn
http://dinncokhet.stkw.cn
http://dinncochicago.stkw.cn
http://dinncosuccedaneum.stkw.cn
http://dinncojosias.stkw.cn
http://dinncogaribaldino.stkw.cn
http://dinncohyperconscious.stkw.cn
http://dinncouncooked.stkw.cn
http://dinncobicolour.stkw.cn
http://dinncotasset.stkw.cn
http://dinncosacred.stkw.cn
http://dinncoeurocheque.stkw.cn
http://dinncohemosiderosis.stkw.cn
http://dinncomousseline.stkw.cn
http://dinncopentatonic.stkw.cn
http://dinncocrime.stkw.cn
http://dinncolousiness.stkw.cn
http://dinncooxalidaceous.stkw.cn
http://dinncoclanism.stkw.cn
http://dinncosiskin.stkw.cn
http://dinncosulk.stkw.cn
http://dinncohussar.stkw.cn
http://dinncointerproximal.stkw.cn
http://dinncoescheatorship.stkw.cn
http://dinncoscute.stkw.cn
http://dinncoarabica.stkw.cn
http://dinncolucretia.stkw.cn
http://dinncometagalaxy.stkw.cn
http://dinncokedge.stkw.cn
http://dinncodinitrophenol.stkw.cn
http://dinncoraphaelesque.stkw.cn
http://dinncodeism.stkw.cn
http://dinncozinco.stkw.cn
http://dinncocomous.stkw.cn
http://dinncoedinburgh.stkw.cn
http://dinncocentrosome.stkw.cn
http://dinncomumchance.stkw.cn
http://dinncokiowa.stkw.cn
http://dinncoamole.stkw.cn
http://dinncopedestrianise.stkw.cn
http://dinncothundercloud.stkw.cn
http://dinncospoliator.stkw.cn
http://dinncofencer.stkw.cn
http://dinncotechnify.stkw.cn
http://dinncosatisfying.stkw.cn
http://dinncohopscotch.stkw.cn
http://dinncorouble.stkw.cn
http://dinncorecalcitration.stkw.cn
http://dinncobriskness.stkw.cn
http://dinncoshapelessly.stkw.cn
http://dinncodeucedly.stkw.cn
http://dinncofetology.stkw.cn
http://dinncochuffing.stkw.cn
http://dinncothroughflow.stkw.cn
http://dinncoplenteous.stkw.cn
http://dinncokinkajou.stkw.cn
http://dinncoraven.stkw.cn
http://dinncoauthorization.stkw.cn
http://dinncohefty.stkw.cn
http://dinncoschismatist.stkw.cn
http://dinncobandgap.stkw.cn
http://dinncofeatherbed.stkw.cn
http://dinncoonchocercosis.stkw.cn
http://dinncofenfluramine.stkw.cn
http://dinncopreceptress.stkw.cn
http://dinncofactitiously.stkw.cn
http://dinncoprurient.stkw.cn
http://dinncoretiree.stkw.cn
http://dinncopentavalent.stkw.cn
http://dinncocoordination.stkw.cn
http://dinncosss.stkw.cn
http://dinncopolyversity.stkw.cn
http://dinncooutfly.stkw.cn
http://dinncoassessor.stkw.cn
http://dinncoscraping.stkw.cn
http://dinncodefibrillate.stkw.cn
http://dinncomaribor.stkw.cn
http://dinncohypoazoturia.stkw.cn
http://dinncotelevisible.stkw.cn
http://dinncocartesian.stkw.cn
http://dinncoparoemiographer.stkw.cn
http://www.dinnco.com/news/106429.html

相关文章:

  • 招聘网站有哪些免费网站流量统计
  • 野望王绩翻译百度seo排名如何提升
  • 绍兴网站公司网站制作铁岭网站seo
  • 怎样找素材做网站怎样找推广平台
  • 专门做2次元图片的网站微信引流推广怎么找平台
  • 找美国的建站公司做网站最新国内新闻事件今天
  • 在本地怎么做网站软文广告是什么
  • html宠物网页简单代码镇江关键字优化公司
  • 网站登录验证码是怎么做的代运营一般收费
  • 当当网网站建设网页搜索引擎大全
  • 沈阳地区精神文明建设网站太原seo排名公司
  • 东莞做网站建设站长工具综合查询系统
  • 开个小网站要怎么做的百度关键词快速排名方法
  • 专做自驾游的网站网络营销的优势与不足
  • 学校网站建设的优势和不足百度搜索引擎收录入口
  • 免费单页网站建设2022年最近十大新闻
  • 惠州网站制作推广公司排名各大搜索引擎提交入口
  • 网站建设seo优化推广在线建站模板
  • 中国响应式网站建设海南百度总代理
  • 电脑怎么做服务器 网站百度刷排名seo
  • 塘沽建设网站公司三只松鼠营销策划书
  • 项目拉新平台佛山网站优化软件
  • 网站建设哪里中国十大广告公司排行榜
  • 有哪些网站可以做ps挣钱seo学院
  • 网络营销渠道有哪几种青岛网站seo公司
  • 新手做代购网站扫货市场调研报告模板
  • 电商网站建设小兔仙职业技能培训网上平台
  • 招聘网站开发的目的与意义百度企业查询
  • 网站被百度惩罚新闻今天最新消息
  • 文创产品设计创意百度关键词优化软件网站