build and share your interactive webmap with kml files

15
Build and share your interactive webmap with KML files With the latest release of ArcGIS.com, you can use KML files in addition to shapefiles, to build and share an interactive web map. KML (keyhold markup language) is an XML-based file format used to represent geographic features in applications such as ArcGIS Explorer and Google Earth. Details on how to download the three KML files used in this tutorial are available in the appendix. 1.0 Adding KML files into ArcGIS.com To add KML files into ArcGIS.com to use as map layers, first open up ArcGIS.com. On a new internet browser, enter this address (http://www.arcgis.com/home/) in the address bar. Once the webpage has loaded, click Sign In to begin. Sign in ArcGIS.com with your ESRI Global Account. If you are a first time user, follow the instructions to create an account.

Upload: others

Post on 11-Feb-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Build and share your interactive webmap with KML files

Build and share your interactive webmap with KML files

With the latest release of ArcGIS.com, you can use KML files in addition to shapefiles, to build and share an interactive web map. KML (keyhold markup language) is an XML-based file format used to represent geographic features in applications such as ArcGIS Explorer and Google Earth. Details on how to download the three KML files used in this tutorial are available in the appendix.

1.0 Adding KML files into ArcGIS.com

To add KML files into ArcGIS.com to use as map layers, first open up ArcGIS.com. On a new internet browser, enter this address (http://www.arcgis.com/home/) in the address bar. Once the webpage has loaded, click Sign In to begin.

Sign in ArcGIS.com with your ESRI Global Account. If you are a first time user, follow the instructions to create an account.

Page 2: Build and share your interactive webmap with KML files

Once signed in, click on My Contents to begin adding KML files into ArcGIS.com. Select Add Item button and a pop up window will appear.

Indicate where your KML file is located, a title for the layer and any tags to go with the layer. Once finished, click Add Item.

Try adding the 3 KML files; ‘City boundary’, ‘Garbage Collection Area in the City’, and ‘Parks’.

Once you have added the item, it will appear on the My Contents page.

Page 3: Build and share your interactive webmap with KML files

You can then Share and Delete the layer etc. Clicking on the item name will also allow you to do these functions in addition to being able to Edit your layer.

Items added are by default Not Shared, and is inaccessible to other users on the web. To make item available to ArcGIS Online and other web users, you will have to Share it. On the Sharing panel, you have the option of sharing the items with the public (Everyone) or members of the group you belong to in ArcGIS.

Page 4: Build and share your interactive webmap with KML files

2.0 Creating a map with KML layers

Click on either Map at the top menu or Create Map on My Contents page to get started.

Once at the My Map page, the button will give you the option of either importing maps directly from your computer, the web, or search for layers.

When searching for layers, you can search for any layer that is available from ArcGIS online or files you’ve previously uploaded in My Content. Enter a keyword, such as ‘mesquite’ in the Find box. There are some key things to remember;

i) When searching for layers from My Content, layers must have the searched keyword as one of the tags in order for it to appear in the search.

ii) If the searched layer is outside the extent of the map, it will not appear in the results.

When the search results return in the Search panel, you then can add the layers into the map. Click Add to add all three layers. Note in ArcGIS Online, you can’t order layers any way you want. Therefore keep in mind of the map layer sequence when adding layers. The first layer added will be on the bottom and the last one will be on top. When working with different file formats, KML layers will always be on top of Shapefiles and Basemaps will appear on the very bottom. When finished, click Done Adding Layers at the bottom of the panel.

Page 5: Build and share your interactive webmap with KML files

2.1 Customization Tools on ArcGIS.com Adjusting Map Views You can use your mouse and the scroll wheel, +/- keys on your keyboard, and the navigation control to focus and zoom around the map. Basemaps

ArcGIS.com offers a variety of basemaps and the default one is ‘Topographic’. Click on to see the different options available. Click Basemaps and select ‘streets’.

Transparency To adjust the layer transparency, click on the button for one of the KML layers in the Contents panel. Select Transparency in the drop down menu to get a pop-up window. Use the slide bar to adjust the transparency value.

Page 6: Build and share your interactive webmap with KML files

2.2 Saving your Map

To save your map, click the button at the top menu to get a Save Map message box. Select Save Map when you have filled out the appropriate information. All the maps you saved will appear and be listed in My Content.

Page 7: Build and share your interactive webmap with KML files

3.0 Adjust KML Layer Symbols and Style with Google Earth

ArcGIS.com doesn’t allow users to directly change KML layer’s symbol and style. You can get around this limitation by using Google Earth. If your computer doesn’t have Google Earth, go to http://www.google.com/earth/index.html to download the program and follow the instructions to install. Start Google earth and open up the KML file in Google Earth. To do so, select File in the menu, select Open, navigate to the folder where your files are located and select the City Boundary file.

To change the KML layer style, first right click the layer and select Properties.

Page 8: Build and share your interactive webmap with KML files

In the pop-up window, click Style,Color tab and click Share Style.

Here, you have various options for changing the color, outline and transparency of your polygon. The City Boundary file is currently defined with the color red, transparency of 49%, with an outline width of 3.0. Select OK when finished.

Page 9: Build and share your interactive webmap with KML files

To save the KML layer, right click on the layer again and select Save Place As.

In the Save File pop up window, make sure the file is saved as KML.

Page 10: Build and share your interactive webmap with KML files

If you want to replace the existing file, name the file the exact same – ‘CityBoundary_01_11_13.kml’. A confirmation message will appear, select Yes to replace the existing file.

Page 11: Build and share your interactive webmap with KML files

4.0 Updating the KML file in ArcGIS.com

The current version of ArcGIS Online does not allow users to directly update the KML file. The work around is to delete the old KML file and re-upload the updated KML file back into My Content. To update the city boundary layer, first delete the older layer. Click on My Content and place a check mark by you City Boundary layer and click Delete.

Using Add Item, re-upload the newly updated KML file (See section 2). Next, to update your previous map with the new KML file, first open up the map by clicking on the Title of your map in My Content.

Next, click the Open tab and select Open in ArcGIS.com map viewer.

Page 12: Build and share your interactive webmap with KML files

If you can’t see any changes in the boundary KML layer, it indicates the layer has not been updated. Since you deleted the old layer from My Content earlier, you should see the following message once ArcGIS Online updates:

Click Ok and simply re-add your updated KML layer with the Add function and Search for Layers (see section 2.0).

Page 13: Build and share your interactive webmap with KML files

5.0 Sharing your map

There are several options to choose when sharing your map: i) Sharing your map with a link

Click on the Share button in the menu and in the pop-up window you can select who can see the map and the provided link allows you to share it with others via email, Facebook or Twitter.

ii) Embedding the map in a website

To embed the map, click the Embed in Website button. In the new message box, you can choose the size you want and several features such as adding a scale bar and legend. Copy and paste the HTML into a website. Click Close when finished.

Page 14: Build and share your interactive webmap with KML files

iii) Make a web application To make a simple web application, click on Make a Web Application in the Share message box. In the pop-up window, there are different templates to choose from – all with the options for publishing, downloading and preview.

If you want the application to be hosted in ArcGIS Online, simply copy and paste the link of your application to your email or website.

Page 15: Build and share your interactive webmap with KML files

Appendix

How to download KML files from the City of Mesquite website in Texas, USA.

1) Open an Internet browser and enter this address in the address bar: http://cityofmesquite.com/gis/kmldownload.php

2) Download the 3 KML files from the City of Mesquite’s website; City Boundary, Garbage Collection and Parks.

3) Clicking on the file name will prompt a pop-up window. Choose Save File and click OK to begin

downloading the KML file. Repeat this step to download all three KML files.

Bonnie Lui July 26, 2013