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

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.

主站蜘蛛池模板: 绍兴市| 黄骅市| 福鼎市| 东乡族自治县| 新密市| 泰顺县| 浑源县| 万全县| 华蓥市| 乃东县| 望谟县| 齐河县| 定远县| 安平县| 贺州市| 莲花县| 嵩明县| 杨浦区| 都安| 三台县| 新野县| 巴林右旗| 临朐县| 平陆县| 东安县| 禄丰县| 上饶县| 凤冈县| 宝山区| 榆社县| 赣州市| 金门县| 民县| 永城市| 周宁县| 贡山| 房产| 鄂伦春自治旗| 五河县| 建湖县| 尚志市|