# WebGIS Development Tutorial **Repository Path**: ruyt/webgis-development-tutorial ## Basic Information - **Project Name**: WebGIS Development Tutorial - **Description**: No description available - **Primary Language**: Unknown - **License**: AFL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2025-06-19 - **Last Updated**: 2025-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Overall Plan and Chapter Overview ## Chapter 1: Introduction to Web Development ### 1.1 Building Static Web Pages with HTML and CSS Static web pages, composed of HTML and CSS, are directly loaded and rendered by browsers without dynamic content generation. This section will introduce the basic syntax and usage of HTML and CSS, including HTML's tag structure and element attributes, as well as CSS styling methods such as inline, internal, and external CSS. It will also provide detailed explanations on how to use CSS for page layout and styling. ### 1.2 Implementing Dynamic Interactions with JavaScript JavaScript is a tool for creating dynamic effects on web pages. This section will cover the basic syntax of the language, including variable declaration, function definition, conditional statements, and loops. Additionally, it will introduce how to manipulate DOM elements and bind events to page elements to achieve dynamic responses like clicks and scrolling, providing syntactic and logical support for subsequent map event handling and function control. ### 1.3 Comprehensive Practice 1: Developing a Dynamic Website This section will guide readers through an integrated case to combine their knowledge of HTML, CSS, and JavaScript in developing a dynamic city promotion website, enhancing their practical web development skills. Readers will learn how to structure page layouts, define text and image content areas, and use CSS for page beautification and responsive adjustments. Meanwhile, JavaScript will be used to implement basic interactive functions such as button switching and information pop - ups to improve user experience. ## Chapter 2: Maps and Layers ### 2.1 Basic Concepts Maps are the fundamental carriers for expressing and visualizing geographic spatial information, symbolizing a series of geographic elements in 2D or 3D space. Layers are the organizational units of map content, with each type of geographic information typically managed and displayed as a layer. This section will systematically explain the definition and components of maps, as well as the logical structure and classification principles of layers, serving as the theoretical foundation for subsequent content. ### 2.2 Web Maps Web maps refer to map services accessed and dynamically loaded via the Internet, offering advantages such as cross - platform compatibility, real - time updates, and multi - source integration. In the ESRI WebGIS development environment, web maps are usually created and managed on the ArcGIS Online/Enterprise platform. This section will demonstrate how to build maps using Map Viewer and publish services through sharing functions, providing usable web map resources for front - end web applications and laying the groundwork for subsequent development practices. ### 2.3 Map Service Layers Map services are standardized means of providing map data to clients over the network, supporting dynamic invocation and sharing of map content. This section will briefly introduce OGC - standard map services such as WMS and WFS, and connect them with ESRI's MapServer and FeatureLayer types. It will further explain how to publish local cartographic documents as map services directly through ArcGIS Pro and how to load, switch, and hide multiple layers simultaneously on the ArcGIS Online/Enterprise platform. ### 2.4 Map Events Map events are the core mechanism for user interaction and dynamic response in WebGIS systems. By monitoring and handling user operations on the map, developers can implement functions such as data query, information display, and map navigation in the map view. This section will systematically explain the types, triggering methods, and practical applications of map events in the ArcGIS Maps SDK for JavaScript, providing an important basis for the development of subsequent map interaction functions. ## Chapter 3: Graphics and Features ### 3.1 Basic Concepts Graphics are temporary geometric objects drawn on the map to represent immediate spatial locations or visual annotations, without a persistent data structure. Features, on the other hand, are standardized geographic entities with spatial geometry and attribute information, which can be stored, queried, edited, and used in spatial analysis. This section will detail the basic concepts, components, and functional differences between the two. ### 3.2 Creating and Modifying Graphics In WebGIS systems, graphics are commonly used for temporary drawing, highlighting, interactive annotation, and spatial selection, playing an important role in building map visualization and interaction functions. This section will explain how to use the ArcGIS Maps SDK for JavaScript to create point, line, and polygon graphics, and implement basic functions such as attribute setting, style switching, and interaction handling. It will also guide readers on how to manipulate graphic elements, including dragging, deleting, and copying. ### 3.3 Creating and Modifying Features In WebGIS systems, features are the fundamental units for implementing core functions such as spatial query, thematic mapping, and data management. This section will delve into how to use the FeatureLayer object in the ArcGIS Maps SDK for JavaScript to add, edit, and update feature data on the map. It will first introduce the basic structure of feature data, then demonstrate how to add new features to the FeatureLayer, update and delete existing features, and attach files to features. ### 3.4 Comprehensive Practice 2: Building a Web Map This section will integrate the knowledge learned in Chapters 2 and 3 through a comprehensive case to build a web map application with map loading, layer display, and interaction functions. The case, themed "Urban Infrastructure Information Display Platform," covers functional modules such as base map loading, layer management, graphic annotation, and feature interaction. Readers will be guided to use the ArcGIS Maps SDK for JavaScript to load web maps published on ArcGIS Online, call base map and Feature Layer services, and build a complete web map page. ## Chapter 4: Map Visualization ### 4.1 Basic Concepts and Design Principles Map visualization is an important means of presenting spatial data as easily understandable graphical symbols in WebGIS systems. This section will introduce the basic concept of map visualization, emphasizing its role in information dissemination, revealing spatial differences, and supporting decision - making. Effective map visualization design should follow principles such as graphic readability, color matching, clear layer hierarchy, and clear symbol semantics to ensure both the aesthetics of the map and the efficiency of information delivery. ### 4.2 Layer Rendering and Symbol System Design Layer rendering controls the presentation of features on the map and is one of the core technologies in map visualization. This section will detail how to configure the color, size, border, transparency, and other symbol attributes of point, line, and polygon features, and how to drive style changes based on attribute fields. The rational design of the symbol system not only affects the aesthetics of the map but also determines the accuracy of visualization and the user's understanding efficiency. ### 4.3 Thematic Map Design and Expression Thematic maps are the core output of map visualization, used to reveal the distribution patterns and attribute characteristics of spatial phenomena. This section will systematically introduce common types of thematic maps in WebGIS platforms, including category symbol maps, choropleth maps, heat maps, and density maps, and demonstrate how to implement them using the ESRI symbol library and Renderer parameter settings. It will also introduce how to use PopupTemplate to display popup information for thematic maps, enhancing the semantic linkage and explanatory power between thematic data and map symbols. ### 4.4 Data - Driven Dynamic Visualization Dynamic visualization is the key to evolving map presentation from "static display" to "showing change processes." This section will focus on how to use attribute values to drive dynamic changes in layer styles, including adjusting point sizes based on population density and setting color gradients for polygons according to temperature values. It will further introduce how to handle time - series data and build a TimeSlider component that supports playback in the map to achieve "temporal visualization." Additionally, it will explore how to enhance the perception of information changes through animation effects, symbol fading, and emerging mechanisms. ### 4.5 Comprehensive Practice 3: Drawing Multi - Feature Thematic Maps To systematically integrate the content of this chapter, this section will design a complete map visualization project case: building a choropleth layer based on urban population density data, overlaying point layers of various public facilities (such as hospitals, schools, and transportation stations), and using different icons and color coding for category symbolization. By combining pop - ups, filters, and layer controls, spatial correlation analysis between population density and facility coverage will be achieved. This case will comprehensively enhance readers' ability to apply map visualization methods using the ArcGIS Maps SDK for JavaScript. ## Chapter 5: Components and Widgets ### 5.1 Basic Concepts Components and widgets are widely used UI building units and functional modules in the ArcGIS Maps SDK for JavaScript, featuring low - code integration, framework independence, and high reusability. Components are pre - built standardized web components (such as map components and chart components) designed to build web applications with minimal code. Widgets, on the other hand, are different functional modules in WebGIS (such as layer lists, legends, and network analysis), which can be directly integrated into map applications to help developers quickly implement complex geospatial analysis functions. ### 5.2 Common Components The ArcGIS component system is developed based on web component standards and supports native JavaScript and mainstream frameworks (such as React and Vue). Map and scene components can directly embed map/scene resources from ArcGIS Online or Portal using the item - id attribute, suitable for quickly embedding public map resources or serving as map containers for complex applications to interact with other components. Chart components support 8 types of charts, driven by standardized JSON configuration files and deeply integrated with map components. ### 5.3 Common Widgets and Custom Widgets This section will first introduce commonly used built - in widgets in the ArcGIS SDK, including Legend and LayerList. Each widget will be demonstrated with example code, showing its invocation methods, parameter settings, and common configurations. It will also introduce strategies for using the Expand widget in combination with other functional controls. In real - world projects, the functions of built - in widgets may not fully meet business requirements, so custom widgets need to be developed. This section will further explain how to encapsulate a custom widget module with specific functions. ## Chapter 6: Feature Query ### 6.1 Basic Concepts Feature query is one of the most basic and common functions in WebGIS systems, widely used to assist users in locating information on the map, retrieving data, and driving interactive behaviors or analysis processes. This section will introduce the basic concepts, working mechanisms, and common application modes of feature query. Feature query extracts geographic features on the server - side or client - side by constructing query conditions and invoking corresponding methods. Based on different query methods, feature query can be divided into attribute - based query and geometry - based query, which will be detailed in subsequent sections. ### 6.2 Attribute - Based Query Attribute - based query is a process of logical filtering based on the attribute field values of features, commonly used to obtain spatial objects that meet certain criteria according to fields such as name, type, and grade. This section will delve into how to construct the where clause of a Query object to set attribute conditions and perform multi - field combined queries. It will also show, with practical code examples, how to call the queryFeatures method of FeatureLayer to return a set of features that meet the conditions. Further, it will explain how to link query results with pop - ups and highlighting to build a responsive attribute query interface. ### 6.3 Geometry - Based Query Geometry - based query is an operation of feature extraction based on geographic spatial relationships, which is crucial for implementing spatial analysis and geographic interaction functions. This section will focus on how to construct spatial query conditions by setting geometric objects, spatial relationships, and reference coordinate systems to achieve tasks such as "selecting features by point," "selecting features by box," and "buffer query." Readers will learn the meanings and usage methods of common spatial relationship types (such as intersects, contains, and within) to build GIS functional modules driven by spatial relationships. ## Chapter 7: Location and Geocoding ### 7.1 Basic Concepts Location and geocoding are key functional modules in WebGIS systems that connect "geographical locations" with "real - world semantics." This section will introduce the basic definitions, classifications, and application scenarios of location and geocoding. Location refers to determining the spatial position of an object or event on a map or in a scene. Geocoding is the process of converting natural - language addresses or names into latitude and longitude coordinates, while reverse geocoding does the opposite, converting coordinate positions into readable address descriptions. ### 7.2 Location in Maps and Scenes In WebGIS development, both map views and 3D scene views support location functions, used to achieve map navigation, view adjustment, and feature focusing. This section will explain in detail how to use the goTo method to focus the view on specified geographic coordinates, geometric objects, or layer features, and set parameters such as animation, zoom level, and view offset. It will also introduce how to respond to click events or form inputs to achieve coordinate - based interactive location, as well as the usage of the Locate widget. ### 7.3 Geocoding and Reverse Geocoding Geocoding and reverse geocoding are two - way conversion services between natural language and spatial data. This section will focus on the World Geocoding Service provided by the ArcGIS platform and its integration into the API. It will explain how to use the Locator class or Search widget to perform address parsing, obtaining geographic locations from user - input address strings. The reverse geocoding part will explain how to return corresponding street, administrative district, and point - of - interest (POI) information based on coordinates after the user clicks on the map. ### 7.4 Comprehensive Practice 4: Development of a POI Search and Location Program This section will guide readers through a comprehensive practice case to develop a POI search and map location functional module based on geocoding. Users can input keywords to trigger geocoding requests, and the system will return matching POI information and display search results on the map. Clicking on a result item will automatically jump the map view to focus on the corresponding location and display a detailed information pop - up. Through this practice, readers will systematically master core functions such as address parsing and view jumping, and develop an integrated WebGIS module from place - name search to spatial location. ## Chapter 8: Spatial Analysis and Geoprocessing ### 8.1 Basic Concepts Spatial analysis helps discover patterns, trends, and gain in - depth understanding of geographic spatial data. Developers can build customized spatial analysis applications through client - side and server - side APIs and tools, mainly including geometric analysis, feature analysis, and raster analysis. Geoprocessing services are the remote analysis capabilities provided by the ArcGIS platform, supporting the encapsulation of local or server - side GIS tools and models into service interfaces for asynchronous invocation, task submission, and result retrieval on the web. ### 8.2 Geometric Analysis Geometric analysis is one of the core capabilities of ArcGIS spatial analysis, referring to performing a series of operations on geometric elements such as points, lines, and polygons through client - side APIs to solve problems such as spatial relationship judgment, geometric shape calculation, and geographic measurement. This section will focus on the geometric analysis capabilities provided by the ArcGIS Maps SDK for JavaScript and their integration into various development platforms. It will explain how to use geometric operation interfaces to perform spatial relationship judgments and geometric shape calculations, as well as how to use measurement tools for geometric measurement. ### 8.3 Feature Analysis Feature analysis is the process of performing server - side function processing on feature data using feature analysis services according to specified analysis methods and models, usually used to solve practical needs such as spatial analysis, distribution pattern evaluation, and intelligent decision - making. The ArcGIS platform provides a variety of feature analysis tools, such as finding features, merging or summarizing features, and statistical analysis or spatial relationship inference. This section will elaborate on how to call relevant interfaces for feature distribution, mutual relationship, and distribution pattern analysis, and explain how to select appropriate analysis methods based on practical problems. ### 8.4 Raster Analysis Raster analysis is a spatial analysis method that extracts patterns, evaluates environmental variables, or simulates spatial processes by performing pixel - level mathematical, logical, or spatial operations on raster data, and is an important tool for understanding the continuity of geographic phenomena. This section will start from the basic structure and expression of raster data, explain the architecture and access methods of raster analysis services, and demonstrate how to use the ArcGIS Raster Analysis service to perform typical tasks such as reclassification, slope calculation, viewshed analysis, path cost evaluation, and land suitability modeling. ### 8.5 Geoprocessing In WebGIS development, geoprocessing services are usually implemented through the Geoprocessor class. Developers can send specific parameters (such as geometry, fields, and files) to invoke pre - configured GP tools (such as buffer analysis, point clustering, and watershed extraction) on the server - side, and then receive task running status and analysis results. This section will introduce the basic structure and execution mechanism of geoprocessing services, and explain how to complete the entire process from task submission to result rendering. By combining GP services with front - end modules such as map layers, pop - up components, and status prompt controls, readers will master the development model of building "task - driven" spatial analysis service applications. ### 8.6 Comprehensive Practice 5: Development of a Site - Selection System Based on Analysis Services This section will guide readers through a comprehensive case to develop a feature analysis system for site - selection applications. Users can input site - selection conditions (such as traffic accessibility, surrounding facility types, and population density thresholds), and the system will perform spatial screening, buffer analysis, overlay analysis, and statistical ranking in the background, and return the optimal recommended areas. The case will cover how to organize the analysis process, pass parameters, manage asynchronous results, and dynamically display analysis results. Through this project practice, readers will master the overall development model of embedding feature analysis functions into actual WebGIS applications, achieving a leap from data to decision - making. ## Chapter 9: 3D GIS Development ### 9.1 Scenes and 3D GIS 三维GIS是地理信息科学的重要发展方向,其理论基础追溯至空间认知、人地关系建模与虚拟现实表达等多学科交汇领域。与传统二维GIS不同,三维GIS强调空间实体的立体结构、垂直属性与复杂几何形态,本节将重点介绍三维场景(Scene)与三维视图(SceneView)的构成关系,说明Web端三维表达所需的服务、数据与运行环境。 ### 9.2 Acquisition and Publication of 3D Data 三维GIS开发依赖高质量的空间数据支撑。本节将介绍三维数据的常见来源,包括倾斜摄影、激光雷达(LiDAR)、BIM模型与三维建模工具(如CityEngine)。重点讲解如何使用ArcGIS Pro生成三维图层(如Multipatch、Scene Layer Package),并将其发布至ArcGIS Online或Enterprise平台,供Web应用调用,实现从数据生产到服务部署的完整流程。 ### 9.3 三维场景可视化 在三维GIS系统中,数据的视觉呈现至关重要。本节将围绕ArcGIS Maps SDK for JavaScript 的三维渲染功能,介绍如何加载地形图层、建筑模型、点云和栅格DEM,控制视角导航、光照效果与视图动画。同时,读者将学习如何定制三维符号(如3D模型符号、立体柱状图)与信息窗口,通过样式与交互的有机结合提升场景表达力。 ### 9.4 三维GIS分析 三维分析是三维GIS区别于传统地图系统的关键能力,支持从高度、体积、可视性等方面拓展空间认知维度。本节将介绍包括可视域分析(Viewshed)、剖面分析(Slice)、阴影分析(Shadow)、三维量测与通视分析等典型功能,结合实际代码讲解其参数设定与结果表达方法。通过场景分析服务,Web端也可接入服务器侧复杂运算模块,实现大尺度三维空间决策支持。 ### 9.5 综合实践6:地形分析教学网站的开发 为综合展示三维GIS开发能力,本节设计一个面向教学的地形分析平台案例。该平台集成地形加载、视图导航、三维量测、剖面分析、视域判断等功能模块,并提供交互式控制面板与图层管理工具。读者将学习如何将三维地图视图、分析组件与用户界面集成,实现教学演示、实验操作与学习引导的一体化平台开发,体现三维GIS在教育、规划与公共展示中的实践价值。 ## 第十章:后端GIS开发 ### 10.1 Overview of ArcGIS Enterprise 在现代 WebGIS 应用系统中,ArcGIS Enterprise 的后端架构是支撑整个平台服务能力的核心,其职责不仅仅是“提供数据”,更是通过丰富而灵活的服务接口,构建起数据、空间计算、资源管理等多个维度的综合支撑体系。本节将首先介绍 ArcGIS Enterprise 的两大核心组成——Server 与 Portal,阐述它们在系统中的定位与分工,进而引出本章重点:后端 REST 接口的开发应用方式。 ### 10.2 ArcGIS Server与Portal ArcGIS Server 组件主要负责空间服务的发布与处理,如地图服务、要素服务、影像服务、空间分析服务等;这些服务以 RESTful API 的形式对外访问,能够被前端应用、移动终端、第三方系统或自动化任务系统灵活调用。ArcGIS Portal 组件则负责处理用户、群组、资源、权限等与内容协作有关的管理任务;其 REST 接口支持自动化地控制内容共享、用户权限配置、项目资源部署等。