Bing Maps Layer
A Bing Maps layer displays map content from a Bing Maps Imagery web service. The service provides access to static map tiles and imagery metadata. As the user navigates the map, the layer fetches new map tiles to be displayed.
To instantiate an AGSBingMapLayer, you need to provide a valid Bing Maps Key and a style for the imagery -- Roads, Aerial, or Aerial with labels.
NSString* bingMapsKey = @"--your--key--";
AGSBingMapLayer* layer = [[AGSBingMapLayer alloc] initWithAppID:bingMapsKey style:AGSBingMapLayerStyleAerial];
After creating the layer, you can add it to the map to display its contents. Once the layer is ready to be used, its loaded property will be enabled. You can then safely access its properties.
if(layer.loaded){
NSLog(@"Spatial Reference : %@", layer.spatialReference);
}
For the sake of interoperability with ArcGIS Server services, it is assumed that the Bing Maps layer uses the WGS 1984 Web Mercator (Auxiliary Sphere) spatial reference (WKID = 102100). The Bing Maps layer can be used with other tiled layers having a Web Mercator spatial reference such as -
- WGS 1984 Web Mercator (Auxiallary Sphere), WKID = 3857
- WGS 1984 Web Mercator, WKID = 102113
Getting a Bing Maps key
If you have ArcGIS Server 10, you may already have a Bing Maps key depending upon your license. To find your key -
- Log in to your ArcGIS Server’s Manager web application.
- In the left pane, navigate to the Settings page (under the Home panel for an ArcGIS Server Java Edition, or under the Services panel for an ArcGIS Server .NET Edition)
- Click on the View Bing Maps Key link to reveal your key. You may be asked to log in again as an added security precaution.
If you don't have a key, or you want to generate a new one, you can follow the directions provided at http://msdn.microsoft.com/en-us/library/ff428642.aspx
When using Bing Maps in your application, it is important to include attribution information. Please see the Branding Guidelines from Microsoft for more information.