make forestmap to use custom tile server
This commit is contained in:
parent
5b8c010613
commit
866d41bf98
6 changed files with 16 additions and 7 deletions
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.pythonPath": "venv/bin/python3.8"
|
||||
}
|
|
@ -41,7 +41,7 @@ requirements = python3,setuptools,requests,certifi,urllib3,chardet,idna,sqlite3,
|
|||
# (str) Custom source folders for requirements
|
||||
# Sets custom source for any requirements with recipes
|
||||
# requirements.source.kivy = ../../kivy
|
||||
#requirements.source.kivy = ../kivysrc
|
||||
# requirements.source.kivy = %(source.dir)s/kivysrc
|
||||
|
||||
# (list) Garden requirements
|
||||
#garden_requirements =
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
# cleanup virtual environment
|
||||
rm -fr venv
|
||||
rm -fr __pycache__
|
||||
|
||||
# cleanup cache
|
||||
#mapview
|
||||
rm -fr cache
|
||||
#mozilla
|
||||
rm -fr .cache
|
||||
|
||||
# cleanup buildozer dirs
|
||||
rm -fr .buildozer
|
||||
|
|
|
@ -16,7 +16,7 @@ class ForestBot(pydle.Client):
|
|||
async def on_connect(self):
|
||||
await super().on_connect()
|
||||
await self.join(CNC_CHANNEL)
|
||||
await self.message(CNC_CHANNEL, '] {}'.format(MOTD))
|
||||
await self.message(CNC_CHANNEL, MOTD)
|
||||
|
||||
async def is_admin(self, nickname):
|
||||
"""
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#:include treemarker.kv
|
||||
|
||||
<ForestMapView>:
|
||||
url: "http://forest.deflax.net:8111/tile/{z}/{x}/{y}.png"
|
||||
lat: 42.131331
|
||||
lon: 24.747571
|
||||
zoom: 17
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
from kivy.app import App
|
||||
from kivy.clock import Clock
|
||||
from kivy_garden.mapview import MapView
|
||||
from kivy_garden.mapview import MapView, MapSource
|
||||
|
||||
from treemarker import TreeMarker
|
||||
|
||||
class ForestMapView(MapView):
|
||||
get_trees_timer = None
|
||||
tree_names = []
|
||||
|
||||
#def on_zoom(self, *args):
|
||||
# self.zoom = 10
|
||||
map_source = MapSource(url="http://forest.deflax.net/tile/{z}/{x}/{y}.png",
|
||||
cache_key="forest-map", tile_size=256,
|
||||
image_ext="png", attribution="@ afx")
|
||||
|
||||
def print_current_zoom(self, *args):
|
||||
print("] Zoom level: " + str(self.zoom))
|
||||
|
|
Loading…
Reference in a new issue