Android Tutorial OSMDroid - MapView for B4A tutorial

Spinter

Active Member
Licensed User
Longtime User
I have not solved!
For example, if I have to read the title of a marker and placed under another marker can not do it. if I click on a google map for the second time on the marker I select one below!
 

warwound

Expert
Licensed User
Longtime User
Sounds like you need a marker clustering solution.
Last week i started to wrap the OSMBonusPack library.
One of it's features is a marker clustering solution: http://code.google.com/p/osmbonuspack/wiki/Tutorial_3.

I've no idea when i will work more on the OSMBonusPack library - i have a busy week ahead working on another project.

Does the OSMBonusPack clustering solution look like it'd solve your problem?

Martin.
 

Spectre

Active Member
Licensed User
Longtime User

Hi!
you can have a single zip file with the updated libraries? Every time I try to download a zip file I get stuck chrome explorer etc ...
 

warwound

Expert
Licensed User
Longtime User

Spectre

Active Member
Licensed User
Longtime User
Hi Martin, very good job...
I started to change my project in your new version. I find a lot of differences. Do you have any examples or documentation in order to proceed with examples?
For example, the GPS tells me more event:

B4X:
MyLocationOverlay1_LocationChanged (newLocation As Location, IsFirstFix As Boolean)
 

warwound

Expert
Licensed User
Longtime User
http://b4a.martinpearman.co.uk/osmdroid/OSMDroid_v4.1_library_files_20140331.zip

I've updated the MyLocationOverlay.
It's Initialize method now requires an EventName parameter:

Initialize (EventName As String, MapView1 As MapView)

And it raises the event:

LocationChanged (NewLocation As Location, IsFirstFix As Boolean)

The version 4.1 MyLocationOverlay doesn't raise the other events that the version 3.0.8 MyLocationOverlay raises.
The ProviderChanged event has been moved to another class which i have not yet wrapped.

Do you use either of the ProviderChanged or FollowLocationAutoDisabled events?

There's little help available converting from 3.0.8 to 4.1, all i can say is to post a list of any missing methods, events or properties and i'll take a look.

Martin.
 

Spinter

Active Member
Licensed User
Longtime User


I would need a sent to back marker superimposed with similar cordinate
 

Spectre

Active Member
Licensed User
Longtime User

I solved was the statement that was wrong and did not generate event ... Markers etc.. seem to work even if I can not show the label with the description always visible. Even the orientation of the map is wrong, see code and error ... Best regards.



B4X:
Sub Sensor_SensorChanged (Values() As Float)
Dim ZeroOrientation As Float
ZeroOrientation=01.0
RotateCompass(Round2(Values(0), 1))
lblMagBearing.Text=(Round2(Values(0), 0))
LocalMagBearing=(Round2(Values(0), 0))'transport mag bearing
lblMag.text=(Round2(Values(0), 0))
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    If TickMapOrientation=2 Then
        Select Case Global.Glob_MAPORIENTATION       
        Case 0
            'MapView1.GetMapOrientation=ZeroOrientation
            TickMapOrientation=0
        Case 1           
            MapView1.GetMapOrientation=Values(0)' direction  head
            TickMapOrientation=0
        Case 2
            MapView1.GetMapOrientation=(Values(0))+ (ActualTargetBearing) 'WP direction
            TickMapOrientation=0
        End Select
    End If   
End Sub

Error:
Parsing code. 0.23
Compiling code. 0.36
Compiling layouts code. 0.02
Generating R file. 0.07
Compiling generated Java code. Error
B4A line: 940
MapView1.GetMapOrientation=ZeroOrientation'heading direction
javac 1.7.0_51
src\Combat\NAVI\map_view.java:5361: error: unexpected type
mostCurrent._mapview1.GetMapOrientation() = _zeroorientation;
^
required: variable
found: value
1 error
 

Spectre

Active Member
Licensed User
Longtime User
Hi!
has also changed the system to set the tile source? MapView1.SetTileSource ("CycleMap")
 

Spinter

Active Member
Licensed User
Longtime User
MapView1.SetTileSource(TileSourceFactory1.GetTileSource(TileSource))
Hi!
has also changed the system to set the tile source? MapView1.SetTileSource ("CycleMap")

DimTileSourceFactory1AsOSMDroid_TileSourceFactory
MapView1.SetTileSource(TileSourceFactory1.GetTileSource("CycleMap"))
 

Spectre

Active Member
Licensed User
Longtime User
tanks... a little difficult without help ...
MapView1.SetTileSource(TileSourceFactory1.GetTileSource(TileSource))


DimTileSourceFactory1AsOSMDroid_TileSourceFactory
MapView1.SetTileSource(TileSourceFactory1.GetTileSource("CycleMap"))
 

Spectre

Active Member
Licensed User
Longtime User

HI! I can not download this example I wanted to see ...I wanted to try to see the label on the map ...
 

Spectre

Active Member
Licensed User
Longtime User

Spectre

Active Member
Licensed User
Longtime User
Hi!
In the latest versions of Marker example 20140227 You can assign a different icon for each marker?
tanks spectre...
 

PABLO2013

Well-Known Member
Licensed User
Longtime User
regards
that could be the following errors, I tried but I can not seem to fix it
thanks
the error is :
java.lang.NullPointerException
 

Attachments

  • error.PNG
    7.7 KB · Views: 291
Cookies are required to use this site. You must accept them to continue using the site. Learn more…