我正在寻找在叶子地图上按省显示整个世界的最佳方式。我找不到运行良好的 GeoJSON 文件。
import geemap
import json
import os
import requests
import ee
from geemap import geojson_to_ee, ee_to_geojson
from ipyleaflet import GeoJSON
gaul2 = ee.FeatureCollection("FAO/GAUL_SIMPLIFIED_500m/2015/level2")
json_data_2 = ee_to_geojson(gaul2)
json_layer_2 = GeoJSON(data=json_data_2, name='GAUL Districts', hover_style={'fillColor': 'red' , 'fillOpacity': 0.5})
m = folium.Map(
location=[-59.1759, -11.6016],
zoom_start=2,
)
folium.GeoJson(json_layer_2, name="geojson").add_to(m)
folium.LayerControl().add_to(m)
m