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

Proposal for project modification #11

Closed
array81 opened this issue Oct 4, 2021 · 11 comments
Closed

Proposal for project modification #11

array81 opened this issue Oct 4, 2021 · 11 comments

Comments

@array81
Copy link

array81 commented Oct 4, 2021

This weekend I worked on making some major changes to the library. My idea is to create a "universal" component for map tiles. I have modified the code so that it is possible to create "tiles providers". So I created a provider for OSM (this works like in your library) and now I'm working on some providers for Google and Here they still don't work since I have to implement the APIKEY. The code is not perfect, there are bugs and things to fix and optimize but it works. I have tried to keep the original code as possible. Could it interest you? Or do you prefer me to create a folk?

@Fr0sT-Brutal
Copy link
Owner

Impressive! Seems we'll have to rename the component then :) Please publish your code somewhere, I'll look at it.

@array81
Copy link
Author

array81 commented Oct 4, 2021

This is the code: https://www.dropbox.com/s/64jzk3lcnfm0y6b/Delphi_OSMMap_mod_array81.zip?dl=0
It is an alpha code. The OSM provider works, Google and Here need APIKEY implementation.
I renamed all the units.
Let me know what your intentions are. If you don't want to change your project I can always make a folk.

@Fr0sT-Brutal
Copy link
Owner

Well... this is pretty big modification. I think I'll merge changes slowly one by one.
As I see all providers seem using the same 256*256 tile sizes (checked maps.yandex.ru as well)? With this assumption we can simplify things.

@array81
Copy link
Author

array81 commented Oct 5, 2021

I think BING allow use both 256px and 512px. In general 256px is more common but I would not eliminate the possibility of varying the size.

@Fr0sT-Brutal
Copy link
Owner

Fr0sT-Brutal commented Oct 5, 2021

Thanks for your efforts!
I started temporary branch https://github.com/Fr0sT-Brutal/Delphi_OSMMap/tree/feat_multi-provider to implement the feature. Demo is working (OSM only).

I still not renaming the project and units have their old names except for network requests that use standard naming <project>.<baseclass>[.<implementation>].pas with base declared in <project>.<baseclass>.pas just like in FMX, FireDAC and other.
TilesProvider units are named in the same manner.

I still have some changes in OSM.MapControl and OSM.SlippyMapUtils to add but Demo works now.

I added you as co-author to TilesProvider units, let me know if this link to GH is OK

@array81
Copy link
Author

array81 commented Oct 6, 2021

The HERE provider works. I tested it, just add your APIKEY and it works.
I think should add "language" and "layer" to TTilesProvider to customize the tiles language and tiles "type" (street, satellite, ...)

@Fr0sT-Brutal
Copy link
Owner

Nice to know! I'll add the unit then.

I think should add "language" and "layer" to TTilesProvider

Hmm, there could be lots of such props specific to just a single provider. I'd rather add stringlist for such stuff.

@Fr0sT-Brutal
Copy link
Owner

Added HERE: ddf1dd5
Added abstract string Properties: f606008

@Fr0sT-Brutal Fr0sT-Brutal mentioned this issue Oct 8, 2021
16 tasks
@fabianopaolini
Copy link

Hi, I'm interested to have different providers... I'm trying to use "OpenTopomap" provider and now I must change the OSM.SlippyMapUtils code... How is this fork? Can I help you to go on?

@Fr0sT-Brutal
Copy link
Owner

Thanks for reminding me about this project, I totally forgot to merge the branch. Now it's in master 0.9.0. So just check how OSM/HERE provider implemented, create a unit in the same manner and post PR.

@Fr0sT-Brutal
Copy link
Owner

@array81 Added Google to master branch, now your changes seem to be fully integrated (except for tile format and size - not needed currently). Let me know if you need something else ;)

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

3 participants