官术网_书友最值得收藏!

Our first Web Map

Now that the introductions are out of the way, we should begin working with the API. In this chapter, we're going to look at some code that will make a simple, interactive map. The example will be a single-page application, with all the styling and coding on the same page. In the real world, we would want to separate those into separate files. For this example, this is what the project is comprised of:

  • Setting up an HTML5 web page
  • Adding the necessary styling and the ArcGIS JavaScript library
  • Framing out our HTML content
  • Setting up a script to create a map
  • Loading a layer file
  • Adding a click event that collects data from the map service
  • Displaying that data on the map

Our assignment

We've just been asked by the Y2K historical society to make an interactive map application of the United States around the year 2000. They want the application to show the U.S. demographics including gender, age, and ethnicity, during that year. After reviewing the request from the client, we determined that the 2000 census data would provide all the mapping and demographics data we were looking for.

After a bit of research, we found an ArcGIS Server map service that serves the 2000 census data. We can use the ArcGIS JavaScript API to show that data on an HTML document. The user will be able to click on the map, and the application will display census data by state, census tract, and census block group.

主站蜘蛛池模板: 三穗县| 海兴县| 宝清县| 东乌| 彰武县| 宁安市| 六盘水市| 昌黎县| 赤水市| 秭归县| 绥棱县| 玛纳斯县| 清镇市| 通辽市| 集安市| 弥勒县| 张家港市| 富宁县| 花莲市| 梨树县| 通城县| 瑞丽市| 长丰县| 余姚市| 东城区| 汾阳市| 林州市| 桐梓县| 桃江县| 津市市| 中江县| 和政县| 遂平县| 曲麻莱县| 电白县| 吉水县| 镇远县| 九江县| 日喀则市| 友谊县| 如东县|