In a previous article titled "ArcGIS Pro Basemap Service Access Issues in China and Solutions", we discussed the blocking of ArcGIS Pro services in China. Although services were later restored, they have been fully switched to Tianditu services, which offer limited basemap options—only six are available. Therefore, I have been continuously exploring and sharing more basemap services accessible within China. Today, I will introduce a method to add Bing Maps as a basemap in ArcGIS Pro. This approach is somewhat indirect and is provided for reference.

Official Method
If you are a licensed user, ArcGIS Pro officially supports adding Bing Maps basemaps directly.
Go to the "Map" tab → "Basemap" → and select:
- Bing Maps Aerial
- Bing Maps Roads
- Bing Maps Hybrid
Prerequisite: You need to log in with an ArcGIS Online account and enable Bing Maps authorization (configured by the organization account administrator). But basemap services under the arcgis.com domain are now blocked in China, if you adding them by force will result in a 504 error. Therefore, this method is not feasible for most users.
Solution Approach
I first encountered this method while using the previously recommended QGIS plugin "QGIS Plugin Recommendation – QuickMapService (Basemap Plugin)", where I found the Bing Maps URL:
https://t0.tiles.virtualearth.net/tiles/a{q}.jpeg?g=685&mkt=en-us&n=zI tried directly adding this URL to ArcGIS Pro but failed repeatedly. Later, I discovered that ArcGIS Pro does not directly support URL templates with {q} (Bing quadkey encoding) because it differs from the standard {x}/{y}/{z} Web Mercator XYZ tile indexing. However, the quadkey encoding method can be converted to and from {x}/{y}/{z}.
This led to a bold idea: could I start a server to convert {q} to {x}/{y}/{z} and then add Bing Maps as a basemap using the service addition method? Through practice, I found a viable method for users in China.
Core Code
# -*- coding: utf-8 -*-
import threading
import requests
import io
from flask import Flask, send_file
# -------------------------
# 1. Flask
# -------------------------
app = Flask(__name__)
def tileXYToQuadKey(x, y, zoom):
quadKey = ""
for i in range(zoom, 0, -1):
digit = 0
mask = 1 << (i - 1)
if (x & mask) != 0:
digit += 2
if (y & mask) != 0:
digit += 2
quadKey += str(digit)
return quadKey
@app.route('/bing/tiles/<int:z>/<int:x>/<int:y>.jpeg')
def get_tile(z, x, y):
q = tileXYToQuadKey(x, y, z)
url = f"https://t0.tiles.virtualearth.net/tiles/a{q}.jpeg?g=685&mkt=en-us&n=z"
r = requests.get(url, timeout=10)
return send_file(io.BytesIO(r.content), mimetype='image/jpeg')
def start_server():
app.run(host="127.0.0.1", port=5000, debug=False, use_reloader=False)
# -------------------------
# 2. main
# -------------------------
if __name__ == "__main__":
server_thread = threading.Thread(target=start_server, daemon=True)
server_thread.start()
print("basemap: http://127.0.0.1:5000/bing/tiles/{z}/{x}/{y}.jpeg")The core of this approach is the above function, which takes traditional x/y/z coordinates as input and outputs the Bing Maps quadkey encoding. It's that simple. For a complete introduction to quadkey, refer to the official documentation: Bing Maps Tile System.
Usage Method
I have packaged the complete source code.
Specific usage steps:
- Extract the downloaded file to a directory, resulting in an
add_bingmap_to_arcgispro.pyfile. This directory will be used later—keep the path simple, without Chinese characters or spaces. - Open ArcGIS Pro, click on Project → Package Manager.

- Click "Add Package", enter "flask".

- Click "Install". After installation, it should look like this:

- Return to ArcGIS Pro, select Analysis → Python → Python Window to open the Python controller. Enter the following code:
exec(open(r"C:\Replace with your own directory\add_bingmap_to_arcgispro.py", "r", encoding='utf-8').read())Press Enter to confirm. The following interface should appear:

- Then, go to Map → Add Data From Path.

- Copy the satellite basemap URL: http://127.0.0.1:5000/bing/tiles/{z}/{x}/{y}.jpeg and enter it.

- Click "OK". If all goes well, Bing Maps will be successfully added.

Summary
This basemap addition method is quite interesting. It is similar to the traditional approach of adding Google Maps basemaps in China but with differences. Both require an intermediate layer for forwarding. However, Google Maps solutions address network issues, while Bing Maps solutions solve the quadkey encoding conversion problem.
Throughout the process, I encountered several challenges. Additional experience summaries will be shared later. If you need other basemaps, you can also refer to this method.