Closed array81 closed 2 years ago
Impressive! Seems we'll have to rename the component then :) Please publish your code somewhere, I'll look at it.
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.
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.
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.
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
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, ...)
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.
Added HERE: ddf1dd51f43eeaefa47bd281a2459ef5a5a506d6 Added abstract string Properties: f6060088055c52fca16616f3ecd72d85d87265f0
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?
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.
@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 ;)
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?