ArcGIS Server: export PNG file with bing map basemap

706
5
05-07-2014 11:58 AM
YangLiu2
New Contributor II
Hi All,

I have a problem with exporting PNG file through running a published GP service. I made a simple tool to export a png file from MXD with python. When I run my script on ArcMap Desktop, I can get a png file stored in a specific folder. However, after publishing as a GP service and running it, the png file has no Bingmap basemap with it. Could anyone help on this?
I knew that for ArcGIS Desktop, we can install a patch to active bing map with Bing maps key. But I have no idea to active the Bing maps key for ArcGIS Server. We are using 10.1 version now.
Besides, I realize that our Bing Maps Extension is expired. Is it being used on ArcGIS Server 10.1 still?
import arcpy,datetime
arcpy.env.overWriteOutput = 1

mxd = arcpy.mapping.MapDocument(r"F:\ArcGISData\bingmap.mxd")

filepath = r"F:\ArcGISData"
                                                    
pngName = "\BINGMAP.png"

outputfile = filepath+pngName
                                                    
arcpy.mapping.ExportToPNG(mxd,outputfile)


Thanks!

-YANG
Tags (2)
0 Kudos
5 Replies
YangLiu2
New Contributor II
I also find information from the link: http://www.reddit.com/r/gis/comments/16zz8v/complimentary_use_of_bing_maps_in_arcgis_being/

It says:
"you will have to obtain your own Bing Maps key directly from Microsoft and input the key into your ArcGIS products. Once you input the new key, you will be able to use Bing Maps in your ArcGIS products. How This Will Affect Use of Bing Maps with ArcGIS Once you obtain a key from Microsoft, you will be able to use Bing Maps in your web and mobile applications, including ArcGIS for Server, ArcGIS Web APIs, and all ArcGIS Mobile SDKs. "

Where can I input the Bing Map key in ArcGIS Server 10.1? Thanks!

-YANG
0 Kudos
NidhinKarthikeyan
Occasional Contributor III
Ensure ArcGIS 10.1 Service Pack 1 (SP1) is installed. Install the ArcGIS 10.1 SP1 (Desktop, Engine, Reader) Set Bing Key Patch.
Open Windows Explorer and search for 'SetBingKey.exe' in the bin folder:
C:\Program Files (x86)\ArcGIS\Desktop10.2\bin
Double-click 'SetBingMap.exe', enter the code and hit OK.
0 Kudos
NidhinKarthikeyan
Occasional Contributor III
0 Kudos
YangLiu2
New Contributor II
Hi Nidhin,

Thanks! My problem is that on my server machine there is no ArcMap Desktop installed. I am looking for a way to add Bing Maps key to ArcGIS Server only. Do you have any suggestion?

-YANG
0 Kudos
NidhinKarthikeyan
Occasional Contributor III
I just found this from a similar thread:

ArcGIS Server 10.1+ does not support entering a Bing key anymore.  What workflow are you using to access Bing?  If you're using a web application, imbed the Bing key within the application.
0 Kudos