效果展示

注意事项
- MapBox
Powerbi中内置的ArcGis Map在功能上非常丰富,而且样式美观,但无法用于发布到web,如果公司要用于发布免登录公共链接,就需要用到MapBox,美观程度上也不错。
- 地理信息
通过接口获取的地理信息要注意处理,因为很多国外接口将台湾、香港归为Country,我们需要进行加工修正。
region_list = ["Hong Kong","Taiwan","Macao"]
if position_info["country"] in region_list:
position_info["country"] = "China "+position_info["country"]
while True:
try:
position_info = requests.get(url,timeout= 15).json()
break
except:
print("Time Out And Try Again。。。")
完整代码:获取节点基础信息,并通过接口请求获取地理位置详情
"""
Created on Mon Jul 27 10:18:49 2020
@author: Songyou Han
"""
import pymysql
from sshtunnel import SSHTunnelForwarder
import requests
import datetime
with SSHTunnelForwarder(
ssh_address_or_host=('跳板机服务器地址', 跳板机端口号),
ssh_username="用户名",
ssh_pkey="私钥的本地存放地址",
remote_bind_address=('目标数据库的地址', 数据库端口号),
local_bind_address=('127.0.0.1', 自定义设置一个本地端口)