Geosdemo
In [1]:
Copied!
import geosdemo
import geosdemo
In [2]:
Copied!
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 4)
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 4)
this is what the user is providing:{'scroll_wheel_zoom': True} {'scroll_wheel_zoom': True} {'scroll_wheel_zoom': True, 'layers_control': True} {'scroll_wheel_zoom': True, 'layers_control': True, 'fullscreen_control': True}
In [3]:
Copied!
m
m
In [4]:
Copied!
m
m
In [5]:
Copied!
m.scroll_wheel_zoom = True #when the wheel does not work, however
#by modifying the class and adding it we can modify the behavior to make this a default
m.scroll_wheel_zoom = True #when the wheel does not work, however
#by modifying the class and adding it we can modify the behavior to make this a default
In [6]:
Copied!
#This step takes place after we include the scroll_wheel_zoom inside as True by default the class
#by making this as False teh default zoom with the mouse wheel should be overrides the default value
import geosdemo
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 4, scroll_wheel_zoom = False) #the user is selecting to do this
m
#This step takes place after we include the scroll_wheel_zoom inside as True by default the class
#by making this as False teh default zoom with the mouse wheel should be overrides the default value
import geosdemo
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 4, scroll_wheel_zoom = False) #the user is selecting to do this
m
this is what the user is providing:{'scroll_wheel_zoom': False} {'scroll_wheel_zoom': False} {'scroll_wheel_zoom': False, 'layers_control': True} {'scroll_wheel_zoom': False, 'layers_control': True, 'fullscreen_control': True}
In [7]:
Copied!
#Check https://ipyleaflet.readthedocs.io/en/latest/controls/index.html to add more controls
import geosdemo
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 4, scroll_wheel_zoom = False) #the user is selecting to do this
m
#Check https://ipyleaflet.readthedocs.io/en/latest/controls/index.html to add more controls
import geosdemo
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 4, scroll_wheel_zoom = False) #the user is selecting to do this
m
this is what the user is providing:{'scroll_wheel_zoom': False} {'scroll_wheel_zoom': False} {'scroll_wheel_zoom': False, 'layers_control': True} {'scroll_wheel_zoom': False, 'layers_control': True, 'fullscreen_control': True}
In [8]:
Copied!
m.add_search_control(position = "topright", zoom = 10)
m
m.add_search_control(position = "topright", zoom = 10)
m
this is what the user is providing:{'zoom': 10, 'url': 'https://nominatim.openstreetmap.org/search?format=json&q={s}'}
In [9]:
Copied!
#We can not use the search because still does not have an associated api for location
#We can not use the search because still does not have an associated api for location
In [10]:
Copied!
url = "https://nominatim.openstreetmap.org/search?format=json&q={s}"
url = "https://nominatim.openstreetmap.org/search?format=json&q={s}"
In [11]:
Copied!
#enabling the search bar
m.add_search_control(position = "topright", zoom = 10, url= url)
m
#enabling the search bar
m.add_search_control(position = "topright", zoom = 10, url= url)
m
this is what the user is providing:{'zoom': 10, 'url': 'https://nominatim.openstreetmap.org/search?format=json&q={s}'}
In [12]:
Copied!
###now having updated search_control
import geosdemo
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 10, scroll_wheel_zoom = True)
m.add_search_control()
m
###now having updated search_control
import geosdemo
m = geosdemo.Map(center=[52.204793, 360.121558], zoom= 10, scroll_wheel_zoom = True)
m.add_search_control()
m
this is what the user is providing:{'scroll_wheel_zoom': True} {'scroll_wheel_zoom': True} {'scroll_wheel_zoom': True, 'layers_control': True} {'scroll_wheel_zoom': True, 'layers_control': True, 'fullscreen_control': True} this is what the user is providing:{'url': 'https://nominatim.openstreetmap.org/search?format=json&q={s}'}
In [13]:
Copied!
m.add_search_control(position="topright") #locating on the top right
m.add_search_control(position="topright") #locating on the top right
this is what the user is providing:{'url': 'https://nominatim.openstreetmap.org/search?format=json&q={s}'}
In [14]:
Copied!
m
m
In [15]:
Copied!
#using drawcontrol
import geosdemo
#using drawcontrol
import geosdemo
In [16]:
Copied!
m = geosdemo.Map(center=[40, -10], zoom=4)
m.add_search_control(position = "topright")
m.add_draw_control()
m
m = geosdemo.Map(center=[40, -10], zoom=4)
m.add_search_control(position = "topright")
m.add_draw_control()
m
this is what the user is providing:{'scroll_wheel_zoom': True} {'scroll_wheel_zoom': True} {'scroll_wheel_zoom': True, 'layers_control': True} {'scroll_wheel_zoom': True, 'layers_control': True, 'fullscreen_control': True} this is what the user is providing:{'url': 'https://nominatim.openstreetmap.org/search?format=json&q={s}'}
In [ ]:
Copied!
Last update:
2023-05-11