arcgis api 4.x for js 聚合效果圖(附源碼下載)

前言

關於本篇功能實現用到的 api 涉及類看不懂的,請參照 esri 官網的 arcgis api 4.x for js:esri 官網 api,裏面詳細的介紹 arcgis api 4.x 各個類的介紹,還有就是在線例子:esri 官網在線例子,這個也是學習 arcgis api 4.x 的好素材。javascript

內容概覽

1.基於 arcgis api 4.x for js 聚合效果
2.源代碼 demo 下載css

本篇實現 arcgis api 4.x for js 聚合效果功能,效果圖以下:


html

  • 聚合數據源
[
{
"toiletId": 1000000,
"name": "Ocean block",
"postcode": "6054",
"facilityType": "Underwater",
"isOpen": "AllHours",
"x": -158.036,
"y": -9.0058
},
……
{
"toiletId": 1000000,
"name": "Ocean block",
"postcode": "6054",
"facilityType": "Underwater",
"isOpen": "AllHours",
"x": -158.036,
"y": -9.0058
}
]
  • html 頁面
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
 
<title>arcgis api 4.x for js 聚合效果圖</title>
 
 
<link href="//fonts.googleapis.com/css?family=Abel" rel="stylesheet">
<link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/css/main.css">
 
<style>
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
font-family: abel, Arial, Calibri;
overflow: hidden;
}
 
#container, .view {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
position: relative;
}
……

更多的詳情見小專欄文章GIS之家小專欄java

文章尾部提供源代碼下載,對本專欄感興趣的話,能夠關注一波web

相關文章
相關標籤/搜索