Android Tutorial Google Maps Android v2 tutorial

Discussion in 'Tutorials & Examples' started by Erel, Dec 18, 2012.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    It should have removed the reference to google-play-services.jar. Not sure why it didn't happen.

    Open GoogleMaps.xml with a text editor, scroll to the bottom and remove the DependsOn line. Now click on Ctrl + P in the IDE and try again.
     
  2. scrat

    scrat Active Member Licensed User

    Thanks Erel ! now project compile and run fine
     
  3. hatzisn

    hatzisn Active Member Licensed User

    Hi everyone,

    I am having problem locating the google-play-services.jar lib and the res folder. I follow the path as it is mentioned in the first post and when I get in the "C:\B4A\Android\extras\google\google_play_services" folder I only see two folders named docs and samples. I have downloaded from the SDK manager the Google Play Services update 31. I searched in the entire hard disk for google-play-services.jar and it didn't produce any results. Has it changed with the number of versions passed since this post or am I doing something wrong? I also have checked the show hidden folders and files checkbox in the folders properties. Still nothing... Any help will be highly appreciated...
     
  4. hatzisn

    hatzisn Active Member Licensed User

  5. hatzisn

    hatzisn Active Member Licensed User

    Hi everyone,

    I downloaded version Google Play Services 29 from the link mentioned above and did everything I was supposed to do according to the first post.
    Here is the error that I get. Am I missing a resource?

    Code:
    Parsing code.  0.07
    Compiling code.  
    0.36
      
    ObfuscatorMap.txt 
    file created in Objects folder.
    Compiling layouts code.  
    0.11
    Generating R 
    file.  Error
    C:\B4A\Android\extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:
    5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.
    And this is the XML included in the file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <resources>
    <!-- Base preview 
    application theme. -->
    <style parent=
    "@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar" name="Theme.AppInvite.Preview.Base"/>
    </resources>
    What am I missing here? Have I done anything wrong?
     
  6. hatzisn

    hatzisn Active Member Licensed User

    I found a solution. It has happened before...
    As Erel has explained in another post all you have to do is change the adroid.jar in your paths to a newer version
     
  7. Startup

    Startup Active Member Licensed User

     
  8. Startup

    Startup Active Member Licensed User

    The next to last line in the example code --

    Code:
    Label1.Text=Marker1.Title&" : "&Marker1.Position
    produces an error message --

    "Object converted to String. This is probably a programming mistake"

    can/should this be fixed or should it be ignored?
     
    Roger Daley likes this.
  9. Erel

    Erel Administrator Staff Member Licensed User

    You can add 'ignore comment at the end of this line to ignore it.

    Or:
    Code:
    Label1.Text = $"${Marker1.Title}: ${Marker1.Position.Latitude} / ${Marker1.Position.Longitude}"$
     
    Roger Daley likes this.
  10. Startup

    Startup Active Member Licensed User

    OK. Thanks!
     
  11. Almora

    Almora Active Member Licensed User

    Code:
    Public Sub LocationChanged(Location1 As Location)
          
    Dim cp As CameraPosition
          cp.Initialize(Location1.Latitude, Location1.Longitude,
    14)
          gmap.AnimateCamera(cp)
          gmap.MyLocationEnabled=
    True

    End Sub
    I find the position on the map. But I can not go if I want to go somewhere else on the map. I'm back to the position again. How do you free yourself after finding your location?
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  13. Daniel Uribe

    Daniel Uribe Member Licensed User

    Hi world!!

    I have a little question. Is possible to remove the interest point of the maps?

    You can see here.

    and looking the screen..

    Thanks a lot!!!
    [​IMG]
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  15. ivanomonti

    ivanomonti Well-Known Member Licensed User



    Error
    Code:
    B4A Versione: 7.30
    Analisi del Codice.    (
    0.00s)
    Compilazione del codice.    (
    0.03s)
    Compilazione del codice di layouts    (
    0.02s)
    Organizzazione Librerie.    (
    0.00s)
    Generazione 
    file R.    (0.06s)
    Compilazione del codice Java prodotto.    Error
    B4A line: 
    49
    Projection1=GoogleMapsExtras1.GetProjection(Googl
    javac 
    1.8.0_60
    src\uk\co\martinpearman\b4a\googlemapdemo\main.java:
    368: error: package com.google.android.gms.maps does not exist
    mostCurrent._projection1 = mostCurrent._googlemapsextras1.GetProjection((com.google.android.gms.maps.GoogleMap)(mostCurrent._googlemap1.getObject()));
                                                                                                        ^
    1 error
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for your questions.

    This is an old and irrelevant tutorial.
     
Thread Status:
Not open for further replies.
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