-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
[v32.0-alpha] Satellite imagery: Download not working for offline #2772
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I feel I've not contributed as much code to SC as I would like (relative to amount of bikeshedding in PRs 😅), and this looks like it is both important and should not be too much work, so I'm up to take a pass at it, unless @matkoniecz has already started. |
Sadly not yet started and likely will not today. Though I am planning to work on it. Implementing things and then dumping on @westnordost task of actually completing it is not a good strategy. So if @smichel17 wants: feel free to work on it! It would be appreciated. |
Ok. I will change the interface as suggested at the top, fix the compiler errors, and then open a draft PR and you can decide if you want to do anything else from there or if that's all that is needed. |
Wait wait, there are a few considerations that aren't in my original deliberations:
|
|
Because it was the only tile provider.
No, it is a reply to
|
What's the relationship between Jawg and Esri? I thought they were independent, but the satellite scene/styles are inside the jawg folder and your suggested interface has the file path at the Aside: First impression of DaggerI'm comfortable with manual dependency injection, but have not used Dagger or other DI frameworks before. I've read through enough of the Dagger docs now to understand how it works for our case, but not enough to understand the full available functionality. It's not totally clear to me how |
Basically none.
Satellite style has also labels/roads displayed from Jawg vector tiles.
jawg folder has jawg compatible map styles, Esri aerial is added as raster layer And even aerial is also using vector data anyway |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I guess this means that the api key is also the same between the tile sources? Should that be pulled up into Brainstorming on naming: maybe the top-level data class should still be named I'm just about done understanding and am going to start writing code soon, so maybe let's wait to continue this discussion until I open a draft PR. I'm leaning toward "just add a satelliteLayer property" for the initial draft and then we can discuss from there. One other thing though: I want to understand the path that tiles take to get to Tangram. For the ESRI tiles, the download url is specified in the yaml scene file, which seems to be passed to Tangram directly. Josm tiles are instead…
Does tangram will ever fetch tiles itself over http? I'm guessing that it does, and the above process is only used for offline tiles? In this case, where does Tangram get the jawg url from? |
Esri requires no API key. |
This comment has been minimized.
This comment has been minimized.
So when using the ESRI layer, both the ESRI and Jawg |
On naming: Within on style for tangram-es, you could have any number of tile sources. It is possible to combine different vector tile and raster tile sources in one style. Then, all these sources are used together. The map scene is like a CSS stylesheet: In the CSS stylesheet, you can refer to any number of image URLs (mediocre comparison). |
Jawg tiles are only available up til zoom 16 I think. This does not mean that you can't zoom in more, just the z16 tiles are the "highest resolution" tiles of Jawg. |
This comment has been minimized.
This comment has been minimized.
All map tile sources are actually specified in the scene yaml file(s). You also find the jawg one there, in tangram-es downloads the map tiles that are in view automatically (of course). But for StreetComplete offline-capability, we want to pre-download all the tiles in a given area when downloading a rectangle. So that is what the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ah, I missed I found https://www.esri.com/en-us/privacy/privacy-statements for a privacy policy link, but I think this is for use of their website, not necessarily their api. |
Ah, good 'old Android Studio Anyway, aside, accessing the preferences seems a little boilerplate-y. Would you be interested in something like this? https://github.com/LibreShift/red-moon/blob/master/app/src/main/java/com/jmstudios/redmoon/model/Config.kt It's a edit: How does one get embedded code snippets to actually work? :/ I would do this as a separate PR; it's not really related to this PR except I bumped into preferences. Also note: the particular implementation uses a little library I wrote to eliminate boilerplate inside the singleton, but that's not necessary for the singleton pattern / I'm not sure I'd use it today. |
This comment has been minimized.
This comment has been minimized.
@matkoniecz @smichel17 maybe we could back out the Satellite imagery feature from v32.0-alpha again and add it back as one package with #2794? I would feel a lot more confident with that, as currently v32.0-alpha is still quite unstable and some question marks left and I want to focus my efforts rather on that than attending to yet new (unstable) features. |
Sure. I'm working on the download now so we can probably get it in for a release, but I think it's a large enough feature (from the user's perspective) to warrant its own release anyway. |
(1) Obviously, feel free to do this! (2) I would prefer for it to be released, but I think that I can avoid any negative consequences of that, and chance that it would cause problems are tiny anyway |
Ok, I removed the option from the settings but left the rest of the code, hoping that it can be finished soon. |
I'll close this issue as this is now not an issue for v32-alpha anymore but will be implemented by that PR |
When downloading the map (either manual or automatic), the map tiles are also downloaded and cached in the upcoming major version.
However, this does currently not happen for the satellite imagery, when that map style is selected.
Furthermore, a link to the privacy statement for the ESRI tiles is missing.
What to do?
VectorTileProvider
should be refactored to look like this:The
jawg
MapScene
then has two sources, the jawg tiles and the esri tiles. Classes where theTileSource
information is used need to be adapted. For example, if there are several tile sources which both require acopyrightText
(that field and others could be made nullable if each none is required), they need to both turn up in the appropriate view.The
MapTilesDownloader
will then accept a list ofTileSource
s (or aMapScene
- not the best name perhaps) and download all the tiles for all the sources in the list.This approach is not very economic with data as it always downloads the satellite data also if the style is not activated. So additional work is needed to only download the satellite imagery conditionally (=if the setting is active?). I guesst he most straightforward impelementation would be to exchange the
MapScene
when the setting is changed.The text was updated successfully, but these errors were encountered: