Page 5 of 10

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Sat Apr 08, 2017 6:51 pm
by djes
Glad to hear it ! :D

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Fri Jun 02, 2017 12:49 pm
by djes

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Thu Jun 08, 2017 2:04 pm
by djes
New version here to test : https://github.com/djes/PBMap/tree/djes

-> better cache mechanism with thread limiting, and thread overload fixed.

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Thu Jun 08, 2017 2:08 pm
by vwidmer
Thanks for the updates.

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Thu Jun 15, 2017 4:24 pm
by djes
New master with full cache rewrite, and new functions from yves86 allowing track modification in the future.
https://github.com/djes/PBMap

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Thu Jun 15, 2017 10:53 pm
by Andre
Thank you for the update :D

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

Posted: Fri Jun 16, 2017 8:29 am
by djes
Andre wrote:Thank you for the update :D

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?
Thank you for your test.

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...

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Fri Jun 16, 2017 11:18 pm
by Andre
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)

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Fri Jun 16, 2017 11:27 pm
by djes
No, it'll always be open source, with provided binary version, to enlarge audience.

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Sun Jun 18, 2017 9:02 pm
by Andre
djes wrote:No, it'll always be open source, with provided binary version, to enlarge audience.
Nice, thank you.

I hope, that PBMap will get more / its deserved attention by this change/addition! :D

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Mon Jun 26, 2017 11:50 pm
by vwidmer
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

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Tue Jun 27, 2017 7:00 am
by djes
I'll study that.

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Tue Jun 27, 2017 4:36 pm
by djes
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.

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Tue Jun 27, 2017 9:23 pm
by vwidmer
So your saying download the tile then run a transparency filter on the downloaded file then load it to the canvas?

Re: PBMap - OpenStreetMap in a Canvas gadget

Posted: Tue Jun 27, 2017 10:20 pm
by djes
vwidmer wrote:So your saying download the tile then run a transparency filter on the downloaded file then load it to the canvas?
Mostly, download the tile, do the transparency filter on it, replace the tile file. That's all.