no map even with api-key


Last Updated:

  1. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    Hello,

    I am sorry to ask what I'm sure is a basic question, but I searched as best I could and did not find anything helpful.

    My problem is: I am going through the walkthroughs of the different views to get a feel for how all this works, however, despite my efforts, I cannot get any map view application to actually display a map. I am relatively certain i have an api-key (a long unintelligible string, correct?), and I know the emulator has an internet connection because the ordinary maps application works just as it should.

    Does anyone have any suggestions? I'm at a loss...
     

    Advertisement
  2. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    even the sample maps code will not display. that leads me to think the problem is something other than code. does anyone have any ideas? please....
     
  3. JoshKraker

    JoshKraker Member

    Joined:
    Dec 3, 2009
    Messages:
    21
    Likes Received:
    0
    did you add the uses permission INTERNET to the manifest?
     
  4. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    I did, and I believe it is in the correct location. Even the SDK demo does not display the map. I've looked around on multiple forums, and this seems to be a moderately common problem, but nobody seems to have a solution.... I don't suppose you know how to use MapView?
     
  5. JoshKraker

    JoshKraker Member

    Joined:
    Dec 3, 2009
    Messages:
    21
    Likes Received:
    0
    Just to be sure I opened the MapsDemo as-is and tried it again from a Google API Level 3 AVD. At first the map did not download. After changing the android:apiKey of res/layout/mapview.xml from sampleapi to my dev key, and changing the code in src/com.example.android.apis.view/MapViewCompassDemo.java, line 143 to mMapView = new MapView(this, "0JsFFNbNoWTxvdN6......."); the maps downloaded fine in the emulator.

    If that doesnt work for you, and you're positive you've got you key right, I'm not sure what else could be wrong. However, if you'd like to zip up your project and email to me I'd be willing to test it with my key so we can figure out if its a IDE/AVD configuration problem or a code problem.
     
  6. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    I made the changes you said you made to get it to display, but I still did not see anything regardless of which level api emulator on which I ran it. Does it seem logical at this point it is either a IDE issue or I have an incorrect APIKEY.

    Do you remember how you went about finding your MD5 fingerprint to then get your APIKEY? Perhaps I went about that incorrectly...

    (I did not send code because there is little reason to when we're using the same code except for the APIKEY which is machine specific as I understand it)
     
  7. JoshKraker

    JoshKraker Member

    Joined:
    Dec 3, 2009
    Messages:
    21
    Likes Received:
    0
    -I went to Window->Preferences->Android->Build and got the default keystore location, mine was C:\Documents and Settings\[User]\.android\debug.keystore
    -open the windows cmd prompt
    -enter cd c:\program files\java\jre6\bin
    -enter keytool -list -keystore [full keystore path]
    -You should be prompted for the keystore password which is: android
    -This will return with some details about the keystore along with a md5. entere this md5, including the ':', at Sign Up for the Android Maps API - Android Maps API - Google Code

    and then there was much rejoicing
     
  8. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    thats pretty much what i did. although i have a question: was first navigating to the java/jre6/bin a crucial part of this? i ask because i did not and do not know how to do so in terminal (sorry, I have a mac). i am continuing my google search, but if you know, that would be awesome....
     
  9. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    ah, i have found at least one of my mistakes. somehow i ended up with multiple MD5 fingerprints, and when i use the correct one i now get a solid light blue screen when its is run. possibly it not knowing my location?
     
  10. drake

    drake Member This Topic's Starter

    Joined:
    Dec 7, 2009
    Messages:
    10
    Likes Received:
    0
    I have been met with SUCCESS!!! ty for helping me out! if you happen to live in the Charlottesville area, you have earned rights to a free copy of my app when i'm done (if i charge for it)!!!
     
  11. JoshKraker

    JoshKraker Member

    Joined:
    Dec 3, 2009
    Messages:
    21
    Likes Received:
    0
    Np, Glad you got it worked out. Aint it the developers life, the most aggravating problems always have the simplest causes.

    I live near Akron, OH and its 12F out so we're just gonna stop talking about that.

    Happy programming!
     
  12. kiterie

    kiterie New Member

    Joined:
    Mar 5, 2010
    Messages:
    1
    Likes Received:
    0
    Hi,
    Could you describe how you manage to make it works?
    Thx
     

Share This Page

Loading...