Bing Maps stay blank

3280
11
07-09-2010 01:27 AM
FrédéricHUMBERT-DROZ
New Contributor
Hi everybody,

I'm trying to use the Bing map layer, but until now I've not been able to make it work. I went on the Bing map url called "Getting Started with Bing API" and created my app id. Then I initialize the AGSBingMapLayer object like that:

AGSBingMapLayer *bingMap = [[AGSBingMapLayer alloc]
  initWithAppID:@"3XXXX0929075CXXXD042FXXX2608B6E7D673XXXX"
  style:kAGSBingMapLayerStyleRoad];

[self.mapView addMapLayer:bingMap withName:@"Bing"];

[bingMap release];


Unfortunately it doesn't work. It seems I missed something, but What ?

Best regards,

Fred
0 Kudos
11 Replies
FrédéricHUMBERT-DROZ
New Contributor
Hi

Did you ever get it to work?

I'm getting the same blankness when trying to use Bing.


Hi, Dear All,

I finally managed to make it work!!!! In fact the code was correct but the key was wrong. Of course they were no warnings, log or errors.... You have two ways to create an appId:

1. The first one is using the Bing developer center (http://www.bing.com/developers) that's what I did first.  What happened is that I visited this website because I found the link in the header file named AGSBingMapLayer.h

/** An AppID which has been authorized to use Bing Maps
 @since 1.0
 @see <a href="http://msdn.microsoft.com/en-us/library/b80e6336-6a33-4555-b26a-ba834c8d756c"> Getting Started with Bing API </a>
 */
@property (nonatomic, copy, readonly) NSString *appID;


2. But, if you want to make it work, you have to create the AppId on the "Bing Maps Account Center" website (http://www.bingmapsportal.com). On this other website, you can also create an appId and this one will be working...

I don't know if I'm the only one who's done this mistake, but it wasn't really clear for me where I had to go to have a valid ID... :confused:

Best regards,

Fred
0 Kudos
DeminHu
New Contributor
I tried to create key with ArcGIs server manager ( version 10) and Map Account center.

Neither of them works, I never got the Bing Map displayed.
0 Kudos