Difference between revisions of "Adding Google Maps Layer"

From Earlham CS Department
Jump to navigation Jump to search
Line 1: Line 1:
It turns out that every individual instance of posit that is  
+
It turns out that every individual instance of posit that is compiled requires its own API key.  
compiled requires its own api key. This is generated by the following  
+
 
command:
+
#Run the following command in a terminal:
  
 
         $ keytool -list -keystore ~/.android/debug.keystore
 
         $ keytool -list -keystore ~/.android/debug.keystore
  
When prompted for a password, you can simply hit Enter. And signing up for the google maps service at this link:
+
#Sign up for the google maps service at this link with:
  
 
         http://code.google.com/android/maps-api-signup.html
 
         http://code.google.com/android/maps-api-signup.html
  
This process will generate the needed key that should then replace the
+
#Replace the following line in positx/res/layout/map_main.xml:
following line in the file, map_main.xml under the res/layout directory:
 
  
         android:apiKey="SOME-KEY" />
+
         android:apiKey="0bvEMJ9m96_er-z_dr1wcZjsucPYBoUZMjI-RQw" />
  
replace with
+
with:
  
 
         android:apiKey="YOUR-GENERATED-KEY" />
 
         android:apiKey="YOUR-GENERATED-KEY" />
 +
 +
#Build and Run

Revision as of 10:28, 20 April 2012

It turns out that every individual instance of posit that is compiled requires its own API key.

  1. Run the following command in a terminal:
        $ keytool -list -keystore ~/.android/debug.keystore
  1. Sign up for the google maps service at this link with:
        http://code.google.com/android/maps-api-signup.html
  1. Replace the following line in positx/res/layout/map_main.xml:
        android:apiKey="0bvEMJ9m96_er-z_dr1wcZjsucPYBoUZMjI-RQw" />

with:

        android:apiKey="YOUR-GENERATED-KEY" />
  1. Build and Run