PBMap - OSM, Here, Geoserver maps in a Canvas gadget
Re: PBMap - OpenStreetMap in a Canvas gadget
Just downloaded and took a look at PBMap. It is great! Thanks...
Is there a way to use a tile server that gives aerial imagery? I looked at Open Street Map site and they say there is high resolution imagery available from
http://wiki.openstreetmap.org/wiki/USGS ... thoimagery
I was trying to see if we can add that as an option to PBMap. I am new to this, so if how to add aerial imagery is immediately obvious to more experienced people let me know, else I will keep trying different options.
Is there a way to use a tile server that gives aerial imagery? I looked at Open Street Map site and they say there is high resolution imagery available from
http://wiki.openstreetmap.org/wiki/USGS ... thoimagery
I was trying to see if we can add that as an option to PBMap. I am new to this, so if how to add aerial imagery is immediately obvious to more experienced people let me know, else I will keep trying different options.
Re: PBMap - OpenStreetMap in a Canvas gadget
Hunting around I saw mapquest used to provide a URL to access satellite imagery tiles but that has been discontinued as of July 2016
Re: PBMap - OpenStreetMap in a Canvas gadget
Thank you for your comment.
Yes, it is possible to add any tiled layer available. What we have provided is a sample of two layers, one with osm and one with nautical infos. It should be possible to add aerial imagery, with minimum knowledge.
We haven't included google or other imagery for copyright reasons, and to promote open source technology, but you can do whatever you want with the code for your own purposes.
I'll take a look to include your linked layer.
Yes, it is possible to add any tiled layer available. What we have provided is a sample of two layers, one with osm and one with nautical infos. It should be possible to add aerial imagery, with minimum knowledge.
We haven't included google or other imagery for copyright reasons, and to promote open source technology, but you can do whatever you want with the code for your own purposes.
I'll take a look to include your linked layer.
Re: PBMap - OpenStreetMap in a Canvas gadget
Satellite imagery seems to be available from a variety of providers. Their URL formats differ slightly and they require a key. For low usage, keys are available for free after signup.
See for example,
https://developer.here.com/rest-apis/do ... e-map.html
One simple way to handle this would be to add
Key string field to Layer structure
and extend the URL so that it has placeholders for x,y,z and key which are replaced by actual tile x,y,z and key using ReplaceString
Bing uses quad trees instead of x,y,z but if we handle only tile x,y,z it will keep everything simpler for now.
See for example,
https://developer.here.com/rest-apis/do ... e-map.html
One simple way to handle this would be to add
Key string field to Layer structure
and extend the URL so that it has placeholders for x,y,z and key which are replaced by actual tile x,y,z and key using ReplaceString
Bing uses quad trees instead of x,y,z but if we handle only tile x,y,z it will keep everything simpler for now.
Re: PBMap - OpenStreetMap in a Canvas gadget
You will find the latest code on this place : https://github.com/djes/PBMap/tree/djes
- HERE support included, don't forget to register on on the HERE site (aerial view as example)
- Nasty dragging bug fixed
- Improved layer support
Re: PBMap - OpenStreetMap in a Canvas gadget
Wow, that was quck! You are awesome djes!
- Andre
- PureBasic Team
- Posts: 2056
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PBMap - OpenStreetMap in a Canvas gadget
I have tested here on Win10 the included (PBMap.pb) example, and also included the updated codes into my project (GeoWorldEditor).djes wrote:You will find the latest code on this place : https://github.com/djes/PBMap/tree/djes
Please test and report bugs...
- HERE support included, don't forget to register on on the HERE site (aerial view as example)
- Nasty dragging bug fixed
- Improved layer support
And it works awesome, thank you very much!
Re: PBMap - OpenStreetMap in a Canvas gadget
I have tested your code djes and it works great!
I am thinking of working on following features
- Limited KML import. I primarily deal with tracks in KML so I would add support for that.
- The user would be able to edit tracks around and save them. Sort of like vector editing in CartoonEdit but the vectors would be saved as geographic coordinates. If we could get the source of a program like CartoonEdit that would be great.
- I am thinking of adding an interface that will allow other programs that generate geographic data to interact with it. If I made a command line interface it would enable both humans and other programs to interact with it using stdio /stdin interface. Maybe we could expose commands like load file, save file, move to and so on. At a later time we could add Lua scripting also
Any inputs would be appreciated.
I am thinking of working on following features
- Limited KML import. I primarily deal with tracks in KML so I would add support for that.
- The user would be able to edit tracks around and save them. Sort of like vector editing in CartoonEdit but the vectors would be saved as geographic coordinates. If we could get the source of a program like CartoonEdit that would be great.
- I am thinking of adding an interface that will allow other programs that generate geographic data to interact with it. If I made a command line interface it would enable both humans and other programs to interact with it using stdio /stdin interface. Maybe we could expose commands like load file, save file, move to and so on. At a later time we could add Lua scripting also
Any inputs would be appreciated.
Re: PBMap - OpenStreetMap in a Canvas gadget
What could I say other than : great! If you want an access to the pbmap repository, just ask.
The gpx tracks are somewhat similar to kml. Shape support would also be useful. It could be implemented inside pbmap, with something similar to the marker edition mode...
The gpx tracks are somewhat similar to kml. Shape support would also be useful. It could be implemented inside pbmap, with something similar to the marker edition mode...
- Andre
- PureBasic Team
- Posts: 2056
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PBMap - OpenStreetMap in a Canvas gadget
I'm just wondering, if the PBMap module can crash if there are problems getting all the needed map tiles (fast enough)!?
First when included in my program, but then also tested it standalone with the included example in the PBMap module itself:
1.) When included in my project I got an 'Image not intialized' error at line 1109
2.) When tested it standalone with the original PBMap example I get a crash without further notice (compiled executable ended unexpected...).
Both happens when I zoom in into the city centre of 'Salzburg' in 'Austria' (bordering country south of Germany). It seems there are some problems getting all map tiles at a high zoom level...
Here is also a Wikipedia article with coordinates in the top-right corner: https://en.wikipedia.org/wiki/Salzburg_Cathedral
See here: => big: https://pl.vc/ve4io
Anyone else getting such problems?
First when included in my program, but then also tested it standalone with the included example in the PBMap module itself:
1.) When included in my project I got an 'Image not intialized' error at line 1109
Code: Select all
DrawVectorImage(ImageID(*timg\nImage), 255)
Both happens when I zoom in into the city centre of 'Salzburg' in 'Austria' (bordering country south of Germany). It seems there are some problems getting all map tiles at a high zoom level...
Here is also a Wikipedia article with coordinates in the top-right corner: https://en.wikipedia.org/wiki/Salzburg_Cathedral
See here: => big: https://pl.vc/ve4io
Anyone else getting such problems?
Re: PBMap - OpenStreetMap in a Canvas gadget
Thank you for your bug report. After some stress test, it seems that the new HTTPProxy() function should not be called in a thread. It was not its place however, I've moved it and there's no bug anymore. I've fixed some little things too. Could you test this new version here ? https://github.com/djes/PBMap/tree/djes
Thank you !
Thank you !
Re: PBMap - OpenStreetMap in a Canvas gadget
This can't be a good app, if it crash 500 m from my homeAndre wrote:Both happens when I zoom in into the city centre of 'Salzburg' in 'Austria'
sorry for my bad english
Re: PBMap - OpenStreetMap in a Canvas gadget
Josh wrote:This can't be a good app, if it crash 500 m from my homeAndre wrote:Both happens when I zoom in into the city centre of 'Salzburg' in 'Austria'
Andre> Sync had failed, if you still have bugs, please try again on https://github.com/djes/PBMap/tree/djes
- Andre
- PureBasic Team
- Posts: 2056
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PBMap - OpenStreetMap in a Canvas gadget
Hi djes,djes wrote:Josh wrote:This can't be a good app, if it crash 500 m from my homeAndre wrote:Both happens when I zoom in into the city centre of 'Salzburg' in 'Austria'
Andre> Sync had failed, if you still have bugs, please try again on https://github.com/djes/PBMap/tree/djes
thanks for the update - I just tried this 2nd new upload (I'm at home only later in evening...).
But unfortunately it crashs again, already if I'm using the example included in PBMap.pb itself.
Starting at the location near Auckland (New Zealand), zooming out and moving the focus to Europe / Austria, and finally zooming in into the city centre of the old town in Salzburg (near cathedral) it crashes "unexpected"...
So the problem 2) as written above is still existing.... I'm wondering if anyone else could try too!?
About the problem 1) I had the idea, if there could be a clash between ImageIDs of my program and the PBMap include (probably using both the same ImageID's?) - my problems began, as soon I reached >100 images (starting with ImageID = 0) in my program. But after some crashes it worked, so there seems to be no general problem. That's why I think you're right with searching the bug related to threads...
@Josh:
Re: PBMap - OpenStreetMap in a Canvas gadget
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 !