Jupyter 没有 return MapBox 地图
Jupyter dosen't return the MapBox map
我正在尝试测试 the jupyter version 的 mapbox gl js。
我在我的 jupyter notebook 中复制了 the code of this example,并尝试 return 地图,
结果是一张空地图!!:
怎么了?
请让我知道地图是否已 return 在您的设备
中编辑
我解决了我的问题,问题出在令牌上:
所以而不是:
token=os.getenv(my_public_token)
(这个函数读取系统环境变量,所以我需要设置一个MAPBOX_ACCESS_TOKEN环境变量如果我想使用它)
解决方法直接是:
token=my_public_token
注意:my_public_token 是您的 mapbox 帐户的 public 令牌
我正在尝试测试 the jupyter version 的 mapbox gl js。
我在我的 jupyter notebook 中复制了 the code of this example,并尝试 return 地图,
结果是一张空地图!!:
怎么了? 请让我知道地图是否已 return 在您的设备
中编辑我解决了我的问题,问题出在令牌上:
所以而不是:
token=os.getenv(my_public_token)
(这个函数读取系统环境变量,所以我需要设置一个MAPBOX_ACCESS_TOKEN环境变量如果我想使用它)
解决方法直接是:
token=my_public_token
注意:my_public_token 是您的 mapbox 帐户的 public 令牌