Using ArcGIS Online services in your Web application |
|
Release 9.3 |
![]() ![]() ![]() |
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.
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:
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.
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:
Click Create Web Application.
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.
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: