Vector
In [ ]:
Copied!
import json
from ipyleaflet import Map, GeoJSON
with open("file.geojson", 'r') as f:
data = json.load(f)
m = Map(center=(50.6252978589571, 0.345809993652344), zoom=3)
geo_json =GeoJSON(
data=data,
)
m.add(geo_json)
m
import json
from ipyleaflet import Map, GeoJSON
with open("file.geojson", 'r') as f:
data = json.load(f)
m = Map(center=(50.6252978589571, 0.345809993652344), zoom=3)
geo_json =GeoJSON(
data=data,
)
m.add(geo_json)
m
In [1]:
Copied!
import mapdemo
import mapdemo
In [2]:
Copied!
m=mapdemo.Map()
m.add_geojson("file.geojson")
m=mapdemo.Map()
m.add_geojson("file.geojson")
In [ ]:
Copied!
style={
'opacity':1, 'dashArray':"9", 'fillOpacity':0.1, 'weight': 1
}
hover_style={
'color': 'blue','dashArray': '0', 'fillOpacity': 0.5
}
m.add_geojson('file.geojson',name='counrties',style=style,hover_style=hover_style)
m.add_layers_control()
m
style={
'opacity':1, 'dashArray':"9", 'fillOpacity':0.1, 'weight': 1
}
hover_style={
'color': 'blue','dashArray': '0', 'fillOpacity': 0.5
}
m.add_geojson('file.geojson',name='counrties',style=style,hover_style=hover_style)
m.add_layers_control()
m