• Like
  • Save
Hello GoogleMaps!
Upcoming SlideShare
Loading in...5
×
 

Hello GoogleMaps!

on

  • 4,111 views

Overviewing Google Maps service and how to start your Google Maps based Android application.

Overviewing Google Maps service and how to start your Google Maps based Android application.

Statistics

Views

Total Views
4,111
Views on SlideShare
3,769
Embed Views
342

Actions

Likes
4
Downloads
119
Comments
0

5 Embeds 342

http://rocboronat.net 202
http://catdroid.org 126
http://www.linkedin.com 8
http://www.rocboronat.net 5
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Hello GoogleMaps! Hello GoogleMaps! Presentation Transcript

    • Hello GoogleMaps!Roc Boronat
    • OverviewWhats a Google Map?About MapActivityBuild your own MapActivityCodesprint!
    • Google«…apples, penguins, windows... and Google»
    • Whats Google Maps? Google Maps (formerly Google Local) is a web mapping service application and technology provided by Google, free (for non- commercial use), that powers many map-based services, including the Google Maps website, Google Ride Finder, Google Transit,[1] and maps embedded on third-party websites via the Google Maps API.[2] It offers street maps, a route planner for traveling by foot, car, or public transport and an urban business locator for numerous countries around the world. Google Maps satellite images are not in real time; they are several years old.[3]http://en.wikipedia.org/wiki/Google_Maps#CatDroid
    • I la ISO, què? What about the ISO? Whats Google Maps? Google Maps (formerly Google Local) is a web mapping service application and technology provided by Google, free (for non- commercial use), that powers many map-based services, including the Google Maps website, Google Ride Finder, Google Transit,[1] and maps embedded on third-party websites via the Google Maps API.[2] It offers street maps, a route planner for traveling by foot, car, or public transport and an urban business locator for numerous countries around the world. Google Maps satellite images are not in real time; they are several years old.[3]http://en.wikipedia.org/wiki/Google_Maps#CatDroid
    • I la ISO, què? What about the ISO? Whats Google Maps? Functionality (formerly Google Local) is a Efficiency Google Maps Suitability web mapping service application and technology provided by Google, Utilisation (for non- Accuracy Interoperability Time Behaviour Resource free commercial use), that powers many map-based services, including the Security Google Maps website, Google Ride Finder, Google Transit,[1] and maps Maintainability Reliability embedded on third-party websites via the Google Maps API.[2] It offers Analyzability Changeability street maps, Maturity a route planner for traveling by foot, car, or public Fault Tolerance Stability Testability transport and an urban business locator for numerous countries around Recoverability the world. Google Maps satellite images are not in real time; they are Portability Usability several years old.[3] Adaptability Understandability Installability Learnability Co-Existence Operability Replaceability Attractiveness * Analising from the user point of view,http://en.wikipedia.org/wiki/ISO/IEC_9126 cause we cannot analise the source code.http://openiconlibrary.sourceforge.net/gallery2/?./Icons/status#CatDroid
    • What can we dowith Google Maps?#CatDroid
    • Facts...http://kcy.me/1vdfhttp://www.bing.com ergo http://google.com#CatDroid
    • Android is an Open Source project? Android is a mobile operating system initially developed by Android Inc. Android was bought by Google in 2005.[5] Android is based upon a modified version of the Linux kernel. Google and other members of the Open Handset Alliance collaborated on Androids development and release.[6][7] The Android Open Source Project (AOSP) is tasked with the maintenance and further development of Android.[8] … With the exception of brief update periods, Android has been available under a free software / open source license since 21 October 2008. Google published the entire source code (including network and telephony stacks)[33] under an Apache License.[34] Google also keeps the reviewed issues list publicly open for anyone to see and comment.[35]http://en.wikipedia.org/wiki/Android_%28operating_system%29#Licensing#CatDroid
    • Google Maps is an Android module? The Google apps for Android, such as YouTube, Google Maps and Navigation, Gmail, and so on are Google properties that are not part of Android, and are licensed separately. Contact android-partnerships@google.com for inquiries related to those apps.http://source.android.com/faqs.html#CatDroid
    • … so? Google APIs Add-On is an extension to the Android SDK development environment that lets you develop applications for devices that include Googles set of custom applications, libraries, and services. A central feature of the add-on is the Maps external library, which lets you add powerful mapping capabilities to your Android application. The add-on also provides a compatible Android system image that runs in the Android Emulator, which lets you debug, profile, and test your application before publishing it to users. The system image includes the the Maps library and other custom system components that your applications may need, to access Google services (such as Android C2DM). The add-on does not include any custom Google applications. When you are ready to publish your application, you can deploy it to any Android-powered device that runs a compatible version of the Android platform and that also includes the custom Google components, libraries, and services.http://code.google.com/intl/en-EN/android/add-ons/google-apis/#CatDroid
    • Free alternatives http://www.openstreetmap.org/ OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. The maps are created using data from portable GPS devices, aerial photography, other free sources or simply from local knowledge. Both rendered images and the vector graphics are available for download under a Creative Commons Attribution-ShareAlike Steve Coast, 2009 2.0 licence.[3]http://en.wikipedia.org/wiki/OpenStreetMap#CatDroid
    • Hello MapView!ASL?
    • Steps 1. Obtaining a Maps API key 2. Adding the lib and the permission to your Manifest 3. Displaying the map 4. Displaying the Zoom View#CatDroid
    • Obtaining a Maps API key Beginning with the Android SDK, you need to apply for a free Google Maps API key before you can integrate Google Maps into your Android application. To apply for a key, you need to follow the series of steps outlined below. You can also refer to Googles detailed documentation on the process at http://code.google.com/android/toolbox/apis/mapkey.html. First, if you are testing the application on the Android emulator, locate the SDK debug certificate located in the default folder of "C:Documents and Settings<username>Local SettingsApplication DataAndroid". The filename of the debug keystore is debug.keystore. For deploying to a real Android device, substitute the debug.keystore file with your own keystore file. For simplicity, copy this file (debug.keystore) to a folder in C: (for example, create a folder called "C:Android").http://developer.android.com/resources/tutorials/views/hello-mapview.html#CatDroid
    • Obtaining a Maps API key Simplified translation: Find “debug.keystore” file inside your “Documents and Settings” path.http://developer.android.com/resources/tutorials/views/hello-mapview.html#CatDroid
    • Obtaining a Maps API key Using the debug keystore, you need to extract its MD5 fingerprint using the Keytool.exe application included with your JDK installation. This fingerprint is needed to apply for the free Google Maps key. You can usually find the Keytool.exe from the "C:Program FilesJava<JDK_version_number>bin" folder.http://developer.android.com/resources/tutorials/views/hello-mapview.html#CatDroid
    • Obtaining a Maps API key Simplified translation: Find “Keytool.exe” file inside your JRE/JDK path, probably placed at “Program Files”.http://developer.android.com/resources/tutorials/views/hello-mapview.html#CatDroid
    • Obtaining a Maps API key Call the following command to extract the MD5 fingerprint. keytool.exe -list -alias androiddebugkey -keystore "C:androiddebug.keystore" -storepass android -keypass androidhttp://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Obtaining a Maps API key Copy the MD5 certificate fingerprint and navigate your web browser to: http://code.google.com/android/maps-api-signup.html Follow the instructions on the page to complete the application and obtain the Google Maps key.http://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Editing AndroidManifest.xml To use the Google Maps in your Android application, you need to modify your AndroidManifest.xml file by adding the <uses- library> element together with the INTERNET permission: <…> <application android:icon="@drawable/icon" android:label="@string/app_name"> <uses-library android:name="com.google.android.maps" /> <activity android:name=".MapsActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.INTERNET" /> </...>http://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Displaying the Map To display the Google Maps in your Android application, modify the main.xml file located in the res/layout folder. You shall use the <com.google.android.maps.MapView> element to display the Google Maps in your activity. In addition, lets use the <RelativeLayout> element to position the map within the activity: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.google.android.maps.MapView android:id="@+id/mapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:enabled="true" android:clickable="true" android:apiKey="0l4sCTTyRmXTNo7k8DREHvEaLar2UmHGwnhZVHQ" /> </RelativeLayout>http://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Displaying the Map In the MapsActivity.java file, modify the class to extend from the MapActivity class, instead of the normal Activity class: package net.learn2develop.GoogleMaps; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; public class MapsActivity extends MapActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { return false; } }http://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Displaying the Zoom View First, add a <LinearLayout> element to the main.xml file as shown below: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.google.android.maps.MapView android:id="@+id/mapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:enabled="true" android:clickable="true" android:apiKey="0l4sCTTyRmXTNo7k8DREHvEaLar2UmHGwnhZVHQ" /> <LinearLayout android:id="@+id/zoom" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" /> </RelativeLayout>http://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Displaying the Zoom View In the MapsActivity.java file, add the following imports: import com.google.android.maps.MapView.LayoutParams; import android.view.View; import android.widget.LinearLayout ...and add the following code after the line setContentView(R.layout.main); mapView = (MapView) findViewById(R.id.mapView); LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom); View zoomView = mapView.getZoomControls(); zoomLayout.addView(zoomView, new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); mapView.displayZoomControls(true);http://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • Displaying the Zoom View Alternatively, you can also programmatically zoom in or out of the map using the zoomIn() and zoomOut() methods from the MapController class: public class MapsActivity extends MapActivity { MapView mapView; public boolean onKeyDown(int keyCode, KeyEvent event) { MapController mc = mapView.getController(); switch (keyCode) { case KeyEvent.KEYCODE_3: mc.zoomIn(); break; case KeyEvent.KEYCODE_1: mc.zoomOut(); break; } return super.onKeyDown(keyCode, event); } // … the rest of the classhttp://mobiforge.com/developing/story/using-google-maps-android#CatDroid
    • More info: Great post where I found the data that Ive pasted here: http://mobiforge.com/developing/story/using-google-maps-android - Changing Views of the Map - Displaying a Particular Location - Adding Markers - Getting the Location that was touched - Geocoding and Reverse Geocoding Wei-Meng Lee is a technologist and the founder of Developer Learning Solutions (http://www.learn2develop.net), a company focusing on hands- on training on the latest technology. Wei-Meng specializes in mobile technologies and has written several books on .NET, VB, C#, and .NET Compact Framework and is currently working on an Android book for Wrox. Contact Wei-Meng Lee at weimenglee@learn2develop.net.#CatDroid
    • More info: The official pseudo-comprehensive post about adding overlay items: http://developer.android.com/resources/tutorials/views/hello-mapview.html You can also try asking at http://groups.google.com/group/CatDroid The most handsome men use to cooperate with that open community. And they also have lots of ziritione. And at last point, if you need a MWC pass, try asking at this community: http://groups.google.com/group/barcelona-gtug#CatDroid
    • Thanks for your attention!… and patience! rocboronat.net catdroid.org roc@rocboronat.net http://groups.google.com/group/CatDroid