Using ArcGIS Online services in your Web application

Release 9.3 E-mail This Topic Printable Version Give Us Feedback
ArcGIS Online services are a set of maps hosted by ESRI that can help support your GIS work.

You can add ArcGIS Online services as layers in your Web mapping applications. To access ArcGIS Online services, you can make a connection to the server using Manager. Advanced developers can also use the Web controls or one of the APIs included with the Web ADF. Whichever way you choose, you will need to specify the URL of the ArcGIS Online server, your user name and password, and the name of the service you want to connect to.

This help system explains how to connect to ArcGIS Online services while building a Web application in Manager. For help with making an ArcGIS Online connection programmatically or through the Web ADF's controls, see the ArcGIS Server Developer Help for your platform.

The Web Mapping Application below was created in Manager and uses an ArcGIS Online service.

Overlaying map caches in Web applications

Each ArcGIS Online service uses a cache of pre-rendered images to quickly display the map. Each image is called a tile. When designing your own map caches that will overlay the ArcGIS Online layers in a Web application, there are some special rules to follow about how you create your cache tiles.

If you will be using your own map caches to overlay ArcGIS Online layers, or vice versa, be sure to read the following guidelines:

Setting the Primary Map Resource in your Web application

In .NET Web applications containing more than one map service, the Primary Map Resource determines which service will supply the coordinate system and zoom levels of the map. You may have noticed that when you build a Web application in Manager, there is a dropdown labeled "Use coordinate system of". The service you select here becomes the Primary Map Resource. If you use Visual Studio to build your Web applications, the Primary Map Resource is a property of the Map control.

In general, you should set the ArcGIS Online service as the Primary Map Resource. The only appropriate scenario to set a different service as the Primary Map Resource is if the service uses the same coordinate system as ArcGIS Online and is cached at scales that correspond with a sequential subset of the ArcGIS Online scales.

Accessing ArcGIS Online services in a Web mapping application

ArcGIS Server Manager contains a simple interface for creating a Web mapping application. The steps below explain how to use Manager to create an application that displays a map with an ArcGIS Online layer. Before performing these steps, you need to register to use ArcGIS Online services. See the ArcGIS Online home page if you're unsure about how to register.

To add an ArcGIS Online service to your Web application, you will need to make a connection to the ArcGIS Online server:

  1. Open ArcGIS Server Manager and click the Applications tab.
  2. Click Create Web Application.

  3. Type a name for the application and click Next. The panel that appears allows you to select layers for your map and modify their properties.
  4. Click Add Layer. A connection to ArcGIS Online has been already added for you.
  5. Double-click ArcGIS Online to see the list of available services.
  6. Choose a service and click Add. You'll see a message that the layer was added successfully.
  7. Optionally, add any of your own services that you will use in your map. Then click Close to close the dialog box.
  8. You can now change the layer order of the services and set transparency values on them. Use the Preview Map button to get an idea of what your map will look like.
  9. Once you've finished adding layers, choose to use the coordinate system of the ArcGIS Online layer. This designates the ArcGIS Online layer as the Primary Map Resource, meaning that other resources on the map will be projected on the fly to match the coordinate system of the ArcGIS Online layer. If you fail to do this step, the ArcGIS Online layer may not appear as expected.

  10. Continue creating your Web application by completing the remaining panels of the Manager wizard.

    Note: ArcGIS Online layers are not displayable in the Magnifier or Overview Map. You can change the MagnifierMapResource property in Visual Studio to use a different layer than the ArcGIS Online resource. For the Overview Map, you should either choose a different layer on the Overview Map Settings dialog box or uncheck the option to include the Overview Map.

You can find complete instructions for creating a Web mapping application in the topics below from the ArcGIS Server Help: