It is currently Tue Oct 24, 2017 3:24 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Mon Mar 20, 2017 10:57 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1384
Location: Germany (Saxony, Deutscheinsiedel)
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! :D

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

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

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Mon Mar 20, 2017 11:20 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
Good to know, I'll try to implement something like that.

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Tue Mar 21, 2017 6:03 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
I've implemented a tile lifetime management, preview as usual on https://github.com/djes/PBMap/tree/djes

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Tue Mar 21, 2017 10:55 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1384
Location: Germany (Saxony, Deutscheinsiedel)
djes wrote:
I've implemented a tile lifetime management, preview as usual on https://github.com/djes/PBMap/tree/djes

I've implemented this new update into my project and it (still) works well :D
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:
    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)

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Tue Mar 21, 2017 10:59 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
Andre wrote:
djes wrote:
I've implemented a tile lifetime management, preview as usual on https://github.com/djes/PBMap/tree/djes

I've implemented this new update into my project and it (still) works well :D
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:
    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
Code:
BindMapGadget(Gadget.i)
procedure, made especially for you... Doesn't it make the job?

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Wed Mar 22, 2017 11:56 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1384
Location: Germany (Saxony, Deutscheinsiedel)
djes wrote:
There's for a long time the
Code:
BindMapGadget(Gadget.i)
procedure, made especially for you... Doesn't it make the job?

Sorry, I forgot about this... :? But thank you! :D

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! :P

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Thu Mar 23, 2017 7:33 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
Andre wrote:
As I will be on vacations the next week, I make a short break from programming. Will be back soon! :P

Wow ! I think you choose the best option to visit this nice place on all its diversity :D
Enjoy !

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Thu Mar 23, 2017 11:57 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1384
Location: Germany (Saxony, Deutscheinsiedel)
djes wrote:
Andre wrote:
As I will be on vacations the next week, I make a short break from programming. Will be back soon! :P

Wow ! I think you choose the best option to visit this nice place on all its diversity :D
Enjoy !

Thank you :mrgreen:

It's a postponed honeymoon in the fifth year of our marriage... :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Fri Mar 24, 2017 12:09 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
Worth the wait, worth the marriage, or both! It gets me confused :mrgreen:

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Sun Apr 02, 2017 2:23 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 141
How would I use this with GeoServer with a tile url like:

Code:
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

_________________
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


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Sun Apr 02, 2017 6:54 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
Let me study a bit the thing and I'll answer you soon.

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Mon Apr 03, 2017 10:38 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
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

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Thu Apr 06, 2017 3:04 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 141
@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.

_________________
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


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Fri Apr 07, 2017 9:54 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1682
Location: Pas-de-Calais, France
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.

_________________
Prehistoric games - Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OpenStreetMap in a Canvas gadget
PostPosted: Sat Apr 08, 2017 5:11 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 141
@djes: Ok so I found out how to call it using the standard OSM way and its working great. Very nice.

_________________
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye