![]() ![]() This tutorial assumes the map templates and template data are present and have not been modified. This tutorial uses the MapTemplates and TemplateData folders in the ArcGIS Desktop installation directory, usually located at C:\Program Files (x86)\ArcGIS\Desktop (on 32-bit operating systems). To complete this tutorial, you should be familiar with the arcpy.mapping module, the ArcGIS API for JavaScript, ArcMap, and ArcGIS Server.You should also become familiar with printing in the web application help topics: The arcpy.mapping module also provides functionality to identify service layers and swap them out for layers that point to local data and to export to a variety of formats, for example, PDF. The staged templates can also contain other elements, such as a legend, dynamic text, and so on. Each template contains vector equivalents of all the possible layers in the map service. You will stage several templates from which the user can choose. The Python script uses the ConvertWebMapToMapDocument function in the arcpy.mapping module, which will insert the full state of the web map into a staged template map document. You will also create a Python script that will be published as a geoprocessing service that the Print Task will use. The ability to pass extra parameters into the Print Task is useful, as it allows you to collect any number of extra parameters from the web application. This tutorial will also show how to pass extra parameters into the Print Task, for example, whether to export georeferencing information to The code behind the Export Map button uses the ArcGIS API for JavaScript Print Task, which is available starting with ArcGIS 10.1 for Desktop and ArcGIS 10.1 for Server. Note that layers that were turned off in the Table of Contents and Legend in the web application are reflected in the output. Export the map to a printer-friendly format containing vector output for service layers.Ī sample output PDF is below.(That is, a layer can be on in the map and off in the legend.) ![]() Control which service sublayers are on/off in the legend in the output file.Control which service sublayers are on/off in the map.Choose whether to export georeferencing information toĪn output PDF file by passing in an extra parameter from the web application to the Print Task.In the web application, the end user will be able to: The illustration below shows a sample web GIS application using the ArcGIS API for JavaScript that you will create. Similarly to spatial information displayed in GIS software, web maps are usually composed of one or more layers.Complexity: Advanced Data Requirement: Installed with software It is usually interactive, and not always self-contained, meaning that it “pulls” content from other locations, such as tile layer servers (Section 6.5.8) or database APIs (Section 9.7) 46. We mentioned that the term “web map” usually implies a map that is not simply on the web, but rather one that is powered by the web. We already introduced the concept of web mapping in Section 0.1. Then, in Chapter 8, we will learn how to define symbology and interactive behavior in our web map. In Chapter 7, we will learn to add complex shapes coming from external GeoJSON files. In the next two Chapters 7– 8, we will learn some more advanced Leaflet functionality. Finally, we will introduce map events-browser events associated with the web map (Section 6.9). We will also learn to add interactive popups for our layers (Section 6.7) and a panel with a textual description of our map (Section 6.8). In this chapter, we will learn how to initialize a Leaflet web map on our web page, and how to add several types of layers on the map: tile layers (Section 6.5.7) and simple shapes such as point markers (Section 6.6.2), lines (Section 6.6.3), and polygons (Section 6.6.4). Using Leaflet, you can create a simple map using just two or three JavaScript expressions, or you can build a complex map using hundreds of lines of code. This chapter and the next two (Chapters 6– 8) introduce Leaflet, a JavaScript library used to create interactive web maps. Now that we have covered the basics of web technologies, we are moving on to the main topic of this book: web mapping. G.6 Installing Node.js and required modules.6.5.3 Including Leaflet CSS and JavaScript.0.3 Why use JavaScript for web mapping?. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |