-
Notifications
You must be signed in to change notification settings - Fork 2
/
MapPage.kv
40 lines (34 loc) · 1.42 KB
/
MapPage.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#:kivy 1.10.0
#:import MapView kivy.garden.mapview
#:import MapSource kivy.garden.mapview
<MapPage>:
cols: 1
GridLayout:
rows: 1
height: 30
size_hint_y: None
TextInput:
id: fromInput
hint_text: 'From'
multiline: False
TextInput:
id: toInput
hint_text: 'To'
multiline: False
Button:
text: 'Directions'
size_hint_x: 0.5
on_press: root.get_directions(fromInput.text, toInput.text)
MapView:
id: mapview
background_color: 0, 0, 0, 1
zoom: 10
lat: 42.4359898
lon: -71.0200613
#map_source: 'osm-hot'
#map_source: 'thunderforest-transport'
#map_source: MapSource.MapSource(cache_key='stamen-watercolor', url='https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png', attribution='')
#map_source: MapSource.MapSource(cache_key='esri-street', url='https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', image_ext='jpeg', attribution='')
map_source: MapSource.MapSource(cache_key='cartodb-darkmatter', url='https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png', attribution='')
#map_source: MapSource.MapSource(cache_key='cartodb-positron', url='https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', attribution='')
#map_source: MapSource.MapSource(cache_key='thunderforest-transportdark', url='http://{s}.tile.thunderforest.com/transport-dark/{z}/{x}/{y}.png', attribution='')