Page 4 of 10
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Mon Mar 20, 2017 10:57 pm
by Andre
djes wrote:Thank you for your test, I'll try to do what you explain tomorrow. If you have some time, could you try with cleaned image cache? There's a button to do that in the example interface. Thank you again !
You're welcome, I have to say thank you!
And I think you got the problem: after clearing the disk-cache, where has been collected around 44 MByte in >3100 image stored in >500 sub-folder, the PBMap example works without a crash.
So maybe a 'counter' (counting the files in the temp folder) would probably help, automatically warning the user to clear the cache if some limit has been reached...
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Mon Mar 20, 2017 11:20 pm
by djes
Good to know, I'll try to implement something like that.
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Tue Mar 21, 2017 6:03 pm
by djes
I've implemented a tile lifetime management, preview as usual on
https://github.com/djes/PBMap/tree/djes
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Tue Mar 21, 2017 10:55 pm
by Andre
I've implemented this new update into my project and it (still) works well
But I haven't seen the "clean-up of the image cache" in action yet...
Just a reminder (as I'm adding the following code each time to the MapGadget() procedure again): I would be happy, if there would be support for already created CanvasGadgets (what I have to initialize already at Dialog creation in my project) by giving their GadgetID as parameter to MapGadget(). Currently I've done it with the trick, that I'm giving the GadgetID as negative value, handled by the following code the MapGadget() function:
Code: Select all
ElseIf Gadget < 0 ; this is an addition by Andre for adapting the PBMap module to the GeoWorldEditor (we are using an already existing CanvasGadget here! => GadgetID will be given as negative number!)
PBMap\Gadget = Abs(Gadget)
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Tue Mar 21, 2017 10:59 pm
by djes
Andre wrote:
I've implemented this new update into my project and it (still) works well
But I haven't seen the "clean-up of the image cache" in action yet...
Just a reminder (as I'm adding the following code each time to the MapGadget() procedure again): I would be happy, if there would be support for already created CanvasGadgets (what I have to initialize already at Dialog creation in my project) by giving their GadgetID as parameter to MapGadget(). Currently I've done it with the trick, that I'm giving the GadgetID as negative value, handled by the following code the MapGadget() function:
Code: Select all
ElseIf Gadget < 0 ; this is an addition by Andre for adapting the PBMap module to the GeoWorldEditor (we are using an already existing CanvasGadget here! => GadgetID will be given as negative number!)
PBMap\Gadget = Abs(Gadget)
There's for a long time the
procedure, made especially for you... Doesn't it make the job?
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Wed Mar 22, 2017 11:56 pm
by Andre
djes wrote:
There's for a long time the
procedure, made especially for you... Doesn't it make the job?
Sorry, I forgot about this...

But thank you!
I still need to check, if it would work (haven't used the Bindxxx commands very often until now, sometimes they seems to be not flexible enough because of limited/fixed parameters etc....).
As I will be on
vacations the next week, I make a short break from programming. Will be back soon!

Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Thu Mar 23, 2017 7:33 am
by djes
Andre wrote:
As I will be on
vacations the next week, I make a short break from programming. Will be back soon!

Wow ! I think you choose the best option to visit this nice place on all its diversity
Enjoy !
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Thu Mar 23, 2017 11:57 pm
by Andre
djes wrote:Andre wrote:
As I will be on
vacations the next week, I make a short break from programming. Will be back soon!

Wow ! I think you choose the best option to visit this nice place on all its diversity
Enjoy !
Thank you
It's a postponed honeymoon in the fifth year of our marriage...

Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Fri Mar 24, 2017 12:09 am
by djes
Worth the wait, worth the marriage, or both! It gets me confused

Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Sun Apr 02, 2017 2:23 pm
by vwidmer
How would I use this with GeoServer with a tile url like:
Code: Select all
http://domain.tld/getmap?PARAMS=LAYERS=config_1_1_0&TRANSPARENT=FALSE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A6859&BBOX=-597611.97676758,4297032.4863364,-597306.22865448,4297338.2344495&WIDTH=256&HEIGHT=256&TEST=-597611.97676758,4297032.4863364,-597306.22865448,4297338.2344495&ZOOM=14&v=1
Do I just change the OSM urls with this map server or do I have to make different functions?
I am still trying to understand how everything works.
Thanks
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Sun Apr 02, 2017 6:54 pm
by djes
Let me study a bit the thing and I'll answer you soon.
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Mon Apr 03, 2017 10:38 am
by djes
I've implemented a basic geoserver/geocache support based on google maps service, as it's the most similar to our approach (see there
http://geowebcache.org/docs/current/services/gmaps.html)
Could you download and test the new version here ? Thank you !
https://github.com/djes/PBMap/tree/djes
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Thu Apr 06, 2017 3:04 am
by vwidmer
@djes: Thanks alot I am trying your code seems to be pulling and probably would work but think the cordinates are different then what its expecting.
It getting somthing like "4042,2498" and think its expecting something more like "1251552.61125,4604309.34"
Think its using EPSG 6859 projection.
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Fri Apr 07, 2017 9:54 am
by djes
vwidmer wrote:@djes: Thanks alot I am trying your code seems to be pulling and probably would work but think the cordinates are different then what its expecting.
It getting somthing like "4042,2498" and think its expecting something more like "1251552.61125,4604309.34"
Think its using EPSG 6859 projection.
Is it possible de change the projection ? We're using the common google projection
http://www.maptiler.org/google-maps-coo ... rojection/, and our code derived from
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames.
Changing the projection is possible (and should occur at some point), but it would need a big rework.
Re: PBMap - OpenStreetMap in a Canvas gadget
Posted: Sat Apr 08, 2017 5:11 pm
by vwidmer
@djes: Ok so I found out how to call it using the standard OSM way and its working great. Very nice.