Uncomment the following line to install geemap if needed.
# !pip install geemap
import geemap
# geemap.update_package()
Map = geemap.Map(center=[0, 0], zoom=2)
in_geojson = 'https://raw.githubusercontent.com/giswqs/geemap/master/examples/data/cable-geo.geojson'
Map.add_geojson(in_geojson, layer_name="Cable lines")
Map
Map = geemap.Map(center=[0, 0], zoom=2)
url = "https://raw.githubusercontent.com/giswqs/geemap/master/examples/data/countries.geojson"
Map.add_geojson(url, layer_name="Countries", fill_colors=['red', 'yellow', 'green', 'orange'])
Map
import random
Map = geemap.Map(center=[0, 0], zoom=2)
url = "https://raw.githubusercontent.com/giswqs/geemap/master/examples/data/countries.geojson"
def random_color(feature):
return {
'color': 'black',
'fillColor': random.choice(['red', 'yellow', 'green', 'orange']),
}
Map.add_geojson(url, layer_name="Countries", style_callback=random_color)
Map
Map = geemap.Map(center=[0, 0], zoom=2)
url = "https://raw.githubusercontent.com/giswqs/geemap/master/examples/data/countries.geojson"
style = {
"stroke": True,
"color": "#0000ff",
"weight": 2,
"opacity": 1,
"fill": True,
"fillColor": "#0000ff",
"fillOpacity": 0.1,
}
hover_style = {"fillOpacity": 0.7}
Map.add_geojson(url, layer_name="Countries", style=style, hover_style=hover_style)
Map
Map = geemap.Map(center=[0, 0], zoom=2)
in_shp = '../data/countries.shp'
Map.add_shapefile(in_shp, layer_name="Countries")
Map
Map = geemap.Map()
in_kml = '../data/us-states.kml'
Map.add_kml(in_kml,layer_name="US States KML")
Map
Map = geemap.Map(center=[0, 0], zoom=2)
url = "https://raw.githubusercontent.com/giswqs/geemap/master/examples/data/countries.geojson"
Map.add_vector(url, layer_name="Countries", fill_colors=['red', 'yellow', 'green', 'orange'])
Map
import geemap.foliumap as geemap
Map = geemap.Map()
in_shp = '../data/countries.shp'
in_geojson = '../data/us-states.json'
in_kml = '../data/us-states.kml'
Map.add_shapefile(in_shp, layer_name="Shapefile")
Map.add_geojson(in_geojson, layer_name="GeoJSON")
Map.add_kml(in_kml, layer_name="KML")
Map