Is anyone still using or interested in using the MapPane?
There's been very little feedback in this thread.
I was gonna upload the library to it's own thread - thinking it was ready for a proper release.
But i think the library is still only beta quality at best so i'll upload the latest update to this thread.
Bad news
This update will break existing apps!
That's
mainly because the various MapPane Initialize methods now require an EventName parameter:
- Initialize (EventName As String)
Initialize the MapPane.
The MapPane will have a size of 800x600 and display Mapnik tiles.
- Initialize2 (EventName As String, TileSource1 As TileSource)
Initialize the MapPane.
The MapPane will have a size of 800x600 and display tiles from TileSource1.
- Initialize3 (EventName As String, TileSource1 As TileSource, X As Int, Y As Int, Width As Int, Height As Int, Zoom As Int)
Initialize the MapPane.
The MapPane will have the defined size and display tiles from TileSource1.
Good news
The MapPane now raises various events which add considerably to it's capabilities:
- MouseClicked (EventData As MouseEvent)
- MouseDragged (EventData As MouseEvent)
- MouseMoved (EventData As MouseEvent)
- MousePressed (EventData As MouseEvent)
- MouseReleased (EventData As MouseEvent)
- Rendered
- Resize (Width As Double, Height As Double)
The MapNodeHost now has a method
SetAutoFix (AutoFix
As Boolean) which determines whether the MapNodeHost will auto adjust it's position to keep itself wholly displayed on the map.
The SimpleMapMarker and ImageMapMarker MouseClicked event now also passes a MouseEvent to B4J (again this will break existing code):
- MouseClicked (ImageMapMarker1 As ImageMapMarker, MouseEvent1 As MouseEvent)
- MouseClicked (SimpleMapMarker1 As SimpleMapMarker, MouseEvent1 As MouseEvent)
The MapPane 'loading tile' image has also been updated and the MapPane now has methods
SetErrorTile (ErrorTile
As Image) and
SetLoadingTile (LoadingTile
As Image) to set the 'loading tile' image and also the 'tile failed to load' image.
That sums up the main changes, the library is now at version 0.09 and is attached with a demo project that shows how to turn a mouse click into a latitude, longitude Coordinate.
Also attached in an updated jCoreExtras.
All and any feedback welcomed!
Martin.