proposal: enhancing staticmap generation with custom tile fetching#15
Open
hiratara wants to merge 5 commits intodanielalvsaaker:masterfrom
Open
proposal: enhancing staticmap generation with custom tile fetching#15hiratara wants to merge 5 commits intodanielalvsaaker:masterfrom
hiratara wants to merge 5 commits intodanielalvsaaker:masterfrom
Conversation
Implemented conditional compilation for 'attohttpc' and 'rayon' dependencies. These libraries are now excluded from the build when 'default_feature' is set to 'false'.
Owner
|
This seems like a great addition! I considered something similar earlier but didn't land on an API I was satisfied with. I considered providing both a sync and async version of a tile provider trait, but it proved to be too clumsy. Instead, I think your sample of a custom Tokio tile provider implementation should be sufficient for such use cases. Would you be interested in also providing an example in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
Hope you're doing well! I've been using your project and found it incredibly useful for my needs. As I often generate static maps and frequently adjust parameters, I've been considering ways to enhance the tile fetching process for efficiency.
I'm utilizing
tokioandreqwestfor async operations and aiming to usehttp_cache_reqwestfor local caching of map tiles. This approach should minimize redundant fetches, speed up development, and reduce unnecessary requests. Additionally, I'm exploring throttling options to manage API request rates better.This PR includes:
TileFetchertrait for customizable tile fetching, adding flexibility.DefaultTileFetcher, utilizingattohttpcandrayon, to maintain a robust default option. My intention is not to replace but to expand the available choices.Here's how I'm implementing my custom
TileFetcher:Details
I've crafted this PR to introduce these features, thinking they might benefit others facing similar challenges. Eager to hear your feedback or suggestions for any improvements.