PBMap - OSM, Here, Geoserver maps in a Canvas gadget
Re: PBMap - OpenStreetMap in a Canvas gadget
Glad to hear it !
Re: PBMap - OpenStreetMap in a Canvas gadget
New version here to test : https://github.com/djes/PBMap/tree/djes
-> better cache mechanism with thread limiting, and thread overload fixed.
-> better cache mechanism with thread limiting, and thread overload fixed.
Re: PBMap - OpenStreetMap in a Canvas gadget
Thanks for the updates.
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: PBMap - OpenStreetMap in a Canvas gadget
New master with full cache rewrite, and new functions from yves86 allowing track modification in the future.
https://github.com/djes/PBMap
https://github.com/djes/PBMap
- Andre
- PureBasic Team
- Posts: 2071
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PBMap - OpenStreetMap in a Canvas gadget
Thank you for the update
I've successfully included it in my project.
I'm just wondering.... does have the download/display speed of the map (when moving around, zooming, etc.) has been decreased because of new functions?
I've successfully included it in my project.
I'm just wondering.... does have the download/display speed of the map (when moving around, zooming, etc.) has been decreased because of new functions?
Re: PBMap - OpenStreetMap in a Canvas gadget
Thank you for your test.Andre wrote:Thank you for the update
I've successfully included it in my project.
I'm just wondering.... does have the download/display speed of the map (when moving around, zooming, etc.) has been decreased because of new functions?
Yes, the display is not slower, but download could be, for two reasons : first, OSM seems to have reinforced rules control, with slower bandwidth (that I've experienced), so, second, I decided to better follow the Tile Usage Policy, reducing to 2 the maximum simultaneous download slots. You can change this behavior, but be warned that it could lead to some disagreement.
I'm thinking to make this program an official implementation, maybe making a DLL...
- Andre
- PureBasic Team
- Posts: 2071
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PBMap - OpenStreetMap in a Canvas gadget
Thank you, djes, for this clarification!
Yes, it really seems to be the bandwidth issue, especially when I'm using a very high detail level (16-18). But this is needed for placing my GeoWorld multimedia objects to the right place on the map...
If you plan to make a DLL will it be closed source then?
Will you also support other OS than Windows then? (currently I could use the include also for the MacOS version of my editor tool)
Yes, it really seems to be the bandwidth issue, especially when I'm using a very high detail level (16-18). But this is needed for placing my GeoWorld multimedia objects to the right place on the map...
If you plan to make a DLL will it be closed source then?
Will you also support other OS than Windows then? (currently I could use the include also for the MacOS version of my editor tool)
Re: PBMap - OpenStreetMap in a Canvas gadget
No, it'll always be open source, with provided binary version, to enlarge audience.
- Andre
- PureBasic Team
- Posts: 2071
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PBMap - OpenStreetMap in a Canvas gadget
Nice, thank you.djes wrote:No, it'll always be open source, with provided binary version, to enlarge audience.
I hope, that PBMap will get more / its deserved attention by this change/addition!
Re: PBMap - OpenStreetMap in a Canvas gadget
Would it be possible to when you have multible layers turned on to make particular colors of other layers transparent?
Example: like the greyish area in the OSM tiles to be transparent so that other tiles show through more clear?
Thanks
Example: like the greyish area in the OSM tiles to be transparent so that other tiles show through more clear?
Thanks
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: PBMap - OpenStreetMap in a Canvas gadget
I'll study that.
Re: PBMap - OpenStreetMap in a Canvas gadget
The "easy" way I see is to use 2D drawing lib's CustomFilterCallback(@CallbackFiltre()) function, and instead of drawing with DrawVectorImage() , using DrawImage(). It should be really slow however if done in realtime (line 1408 of pbmap.pb). A better solution would be to convert PNG file when downloaded, creating a definitive transparent one. Then, the drawing could occur at normal speed. It shouldn't be too difficult to implement (after line 2542 of pbmap.pb, called when the download thread is finished).
Finally, the best solution would be to use a custom tile server, creating good transparent tiles from vector data. It's a bit expensive BTW.
Finally, the best solution would be to use a custom tile server, creating good transparent tiles from vector data. It's a bit expensive BTW.
Re: PBMap - OpenStreetMap in a Canvas gadget
So your saying download the tile then run a transparency filter on the downloaded file then load it to the canvas?
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: PBMap - OpenStreetMap in a Canvas gadget
Mostly, download the tile, do the transparency filter on it, replace the tile file. That's all.vwidmer wrote:So your saying download the tile then run a transparency filter on the downloaded file then load it to the canvas?