1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Tutorial OSMDroid - MapView for B4A tutorial

Discussion in 'Tutorials & Examples' started by warwound, Mar 26, 2012.

  1. Spinter

    Spinter Active Member Licensed User

    ok thank you very much now I feel!
     
  2. Spinter

    Spinter Active Member Licensed 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!
     
  3. warwound

    warwound Expert Licensed 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.
     
  4. Spectre

    Spectre Active Member Licensed 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 ...
     
  5. warwound

    warwound Expert Licensed User

  6. Spectre

    Spectre Active Member Licensed 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:

    Code:
    MyLocationOverlay1_LocationChanged (newLocation As Location, IsFirstFix As Boolean)
     
  7. warwound

    warwound Expert Licensed 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.
     
  8. Spinter

    Spinter Active Member Licensed User


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

    Spectre Active Member Licensed 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.



    Code:
    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
     
  10. warwound

    warwound Expert Licensed User

    @Spectre

    You need to call the method:

    SetMapOrientation (Degrees As Float)

    Martin.
     
  11. Spectre

    Spectre Active Member Licensed User

    sono proprio un idiota.... sorry LOL....
     
  12. Spectre

    Spectre Active Member Licensed User

    are an idiot .... sorry LOL LOL :(:p
     
    warwound likes this.
  13. Spectre

    Spectre Active Member Licensed User

    Hi!
    has also changed the system to set the tile source? MapView1.SetTileSource ("CycleMap")
     
  14. Spinter

    Spinter Active Member Licensed User

    MapView1.SetTileSource(TileSourceFactory1.GetTileSource(TileSource))
    DimTileSourceFactory1AsOSMDroid_TileSourceFactory
    MapView1.SetTileSource(TileSourceFactory1.GetTileSource("CycleMap"))
     
  15. Spectre

    Spectre Active Member Licensed User

    tanks... a little difficult without help ...
     
  16. Spectre

    Spectre Active Member Licensed User

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

    warwound Expert Licensed User

  18. Spectre

    Spectre Active Member Licensed User

  19. Spectre

    Spectre Active Member Licensed User

    Hi!
    In the latest versions of Marker example 20140227 You can assign a different icon for each marker?
    tanks spectre...
     
  20. Spectre

    Spectre Active Member Licensed User

    I solved it thanks ...
     
    warwound likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice