Geodatatool map intro
Compare default map of geodatatool and ipyleaflet¶
In [1]:
# import package
import geodatatool
In [2]:
# define m as default geodatatool map
m = geodatatool.Map()
# display map
m
In [3]:
# import package
import ipyleaflet
In [4]:
# define m as default ipyleaflet map
m = ipyleaflet.Map()
# display map
m
In [5]:
# define m as ipyleaflet map with same settings used as geodatatool default map
m = ipyleaflet.Map(center=[30, -90], zoom=2)
m.layout.height="600px"
m.add_control(ipyleaflet.FullScreenControl())
m.add_control(ipyleaflet.LayersControl(position="topright"))
m.add_control(ipyleaflet.DrawControl(position="topleft"))
m.add_control(ipyleaflet.MeasureControl())
m.add_control(ipyleaflet.ScaleControl(position="bottomleft"))
google_satellite = ipyleaflet.TileLayer(
url="https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}",
attribution="Google",
name="Google Satellite"
)
m.add_layer(google_satellite)
# display map
m
Set center, zoom, and height of geodatatool map¶
In [6]:
# define m as map with different center and zoom
m = geodatatool.Map(center=[30, -85], zoom=5)
# set display height at 450 pixels
m.layout.height="450px"
# display map
m
Add Google Maps road map layer to geodatatool map¶
In [7]:
# define m as map
# with same center and zoom used in previous map
# and with Google Maps layer set as road map
m = geodatatool.Map(center=[30, -85], zoom=5, google_map="ROADMAP")
# display map
m
Last update: 2021-05-07