Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using offline tiles #123

Open
dede-64 opened this issue Jan 16, 2024 · 0 comments
Open

Using offline tiles #123

dede-64 opened this issue Jan 16, 2024 · 0 comments

Comments

@dede-64
Copy link

dede-64 commented Jan 16, 2024

Hello TomSchimansky, just starting with github. So i dont know if this is the right way......
Using your nice Widget with offline tiles, i just found an mistake in offline_loading.py
In procedure save_offline_tiles at updating the section-table in the database, you defines both, position_a and position_b in the
sql-query to point at position_b.

insert loading section in database

    db_cursor.execute(f"INSERT INTO sections (position_a, position_b, zoom_a, zoom_b, server) VALUES (?, ?, ?, ?, ?);",
                      (str(position_b), str(position_b), zoom_a, zoom_b, self.tile_server))
                      ----^

This, i think, has to be corrected to str(position_a), str(position_b)........
Furtheron, as i uses an tile-server on localhost (using python -m http.server) for creation of the offline database,
i have to set the tile-server of the map-widget when using the pre created database to the same tile-server string as for creating.
Otherwise the tiles in the database wont be found, cause of the init of tile-server-string to openstreetmap.

Sorry, gerade erst den Github Account erstellt. Danke auf jeden Fall für das Widget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant