Hi djes,
the latest improved versions from 09th + 13th September work both like charm, many thanks for it!
I already successfully implemented the PBMap into an own (currently only internal) application, used for collecting landscape and other images and selecting their correct latitude/longitude position using PBMap (OpenStreetMap) on the map. So a very worthful help for me. Credits to you and your team are already noted (as soon the complete project will be released to the public, probably first version next year...).
As I have already created a dialog with all needed gadgets before using the PBMap stuff, I've also an already existing CanvasGadget. To implement this correctly for using it with PBMap I've extended the MapGadget procedure like below (see the ElseIf statement):
Code: Select all
Procedure MapGadget(Gadget.i, X.i, Y.i, Width.i, Height.i)
If Gadget = #PB_Any
PBMap\Gadget = CanvasGadget(PBMap\Gadget, X, Y, Width, Height, #PB_Canvas_Keyboard) ;#PB_Canvas_Keyboard has to be set for mousewheel to work on windows
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)
Else
PBMap\Gadget = Gadget
CanvasGadget(PBMap\Gadget, X, Y, Width, Height, #PB_Canvas_Keyboard)
EndIf
BindGadgetEvent(PBMap\Gadget, @CanvasEvents())
AddWindowTimer(PBMap\Window, PBMap\Timer, PBMap\Options\TimerInterval)
BindEvent(#PB_Event_Timer, @TimerEvents())
;AddKeyboardShortcut(#PB_Shortcut_Delete
EndProcedure
Calling the procedure like this with negative Gadget number:
PBMap::MapGadget(-#PicDB_MapCanvas, 5, 5, GadgetWidth(#PicDB_MapCanvas)-10, GadgetHeight(#PicDB_MapCanvas)-10) ; the GadgetID of the MapCanvas will be given as negative number => this avoids, that the PBMap module is creating a new CanvasGadget!!!
So again, many thanks!
I will follow all further development on this...