SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Hello GoogleMaps!
Roc Boronat
Overview

What's a Google Map?


About MapActivity


Build your own MapActivity


Codesprint!
Google
«…apples, penguins, windows... and Google»
What's 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?



       What's 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?



        What's 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 do
with Google Maps?




#CatDroid
Facts...
http://kcy.me/1vdf




http://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 Android's 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 Google's 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 Google's 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 android




http://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, let's 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 class


http://mobiforge.com/developing/story/using-google-maps-android
#CatDroid
More info:
   Great post where I found the data that I've 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

Mais conteúdo relacionado

Semelhante a Hello GoogleMaps!

Getting Started with Android 1.5
Getting Started with Android 1.5Getting Started with Android 1.5
Getting Started with Android 1.5Gaurav Kohli
 
Mobile Augmented Reality Development Tools
Mobile Augmented Reality Development ToolsMobile Augmented Reality Development Tools
Mobile Augmented Reality Development ToolsUpekha Vandebona
 
Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033Editor IJARCET
 
Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033Editor IJARCET
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentProf. Erwin Globio
 
Jaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based ApplicationJaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based ApplicationAI Publications
 
Jaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based ApplicationJaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based ApplicationAI Publications
 
Report on Augmented Reality 2015
Report on Augmented Reality 2015Report on Augmented Reality 2015
Report on Augmented Reality 2015Avishekh Bharati
 
Getting Started with Android Development
Getting Started with Android DevelopmentGetting Started with Android Development
Getting Started with Android DevelopmentEdureka!
 
Scope of Android and Future Work
Scope of Android and Future WorkScope of Android and Future Work
Scope of Android and Future WorkRabiRehman1
 
Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009sullis
 
Google Location Services
Google Location ServicesGoogle Location Services
Google Location ServicesVishal Sapariya
 
Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Elif Boncuk
 
Application Development Tools For Android
Application Development Tools For AndroidApplication Development Tools For Android
Application Development Tools For AndroidNelsan Ellis
 
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...Ibrahim Özgön
 
Google Glass: A Futuristic Fashion Failure Gadget
Google Glass: A Futuristic Fashion Failure  GadgetGoogle Glass: A Futuristic Fashion Failure  Gadget
Google Glass: A Futuristic Fashion Failure GadgetMd. Salim Reza Jony
 

Semelhante a Hello GoogleMaps! (20)

Getting Started with Android 1.5
Getting Started with Android 1.5Getting Started with Android 1.5
Getting Started with Android 1.5
 
Mobile Augmented Reality Development Tools
Mobile Augmented Reality Development ToolsMobile Augmented Reality Development Tools
Mobile Augmented Reality Development Tools
 
Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033
 
Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033Volume 2-issue-6-2030-2033
Volume 2-issue-6-2030-2033
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Mobile cloud
Mobile cloudMobile cloud
Mobile cloud
 
Jaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based ApplicationJaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based Application
 
Jaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based ApplicationJaipur Bus Finder - An Android-based Application
Jaipur Bus Finder - An Android-based Application
 
safe journey
safe journeysafe journey
safe journey
 
Report on Augmented Reality 2015
Report on Augmented Reality 2015Report on Augmented Reality 2015
Report on Augmented Reality 2015
 
Getting Started with Android Development
Getting Started with Android DevelopmentGetting Started with Android Development
Getting Started with Android Development
 
Scope of Android and Future Work
Scope of Android and Future WorkScope of Android and Future Work
Scope of Android and Future Work
 
Android ppt
 Android ppt Android ppt
Android ppt
 
Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009
 
Google Location Services
Google Location ServicesGoogle Location Services
Google Location Services
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 
Overview of DroidCon UK 2015
Overview of DroidCon UK 2015 Overview of DroidCon UK 2015
Overview of DroidCon UK 2015
 
Application Development Tools For Android
Application Development Tools For AndroidApplication Development Tools For Android
Application Development Tools For Android
 
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
 
Google Glass: A Futuristic Fashion Failure Gadget
Google Glass: A Futuristic Fashion Failure  GadgetGoogle Glass: A Futuristic Fashion Failure  Gadget
Google Glass: A Futuristic Fashion Failure Gadget
 

Mais de Roc Boronat

Introducing EDD: Error Driven Development
Introducing EDD: Error Driven DevelopmentIntroducing EDD: Error Driven Development
Introducing EDD: Error Driven DevelopmentRoc Boronat
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean ArchitectureRoc Boronat
 
Testing, CI and CD in the real world
Testing, CI and CD in the real worldTesting, CI and CD in the real world
Testing, CI and CD in the real worldRoc Boronat
 
Testing, CI and CD in the real world
Testing, CI and CD in the real worldTesting, CI and CD in the real world
Testing, CI and CD in the real worldRoc Boronat
 
The chromecast's guide to the galaxy
The chromecast's guide to the galaxyThe chromecast's guide to the galaxy
The chromecast's guide to the galaxyRoc Boronat
 
Sessió motivacional
Sessió motivacionalSessió motivacional
Sessió motivacionalRoc Boronat
 
Barcelona Bicing: Next steps
Barcelona Bicing: Next stepsBarcelona Bicing: Next steps
Barcelona Bicing: Next stepsRoc Boronat
 

Mais de Roc Boronat (10)

Introducing EDD: Error Driven Development
Introducing EDD: Error Driven DevelopmentIntroducing EDD: Error Driven Development
Introducing EDD: Error Driven Development
 
From CVS to GIT
From CVS to GITFrom CVS to GIT
From CVS to GIT
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Testing, CI and CD in the real world
Testing, CI and CD in the real worldTesting, CI and CD in the real world
Testing, CI and CD in the real world
 
Testing, CI and CD in the real world
Testing, CI and CD in the real worldTesting, CI and CD in the real world
Testing, CI and CD in the real world
 
The chromecast's guide to the galaxy
The chromecast's guide to the galaxyThe chromecast's guide to the galaxy
The chromecast's guide to the galaxy
 
Sessió motivacional
Sessió motivacionalSessió motivacional
Sessió motivacional
 
QuitNow!
QuitNow!QuitNow!
QuitNow!
 
Hello NFC!
Hello NFC!Hello NFC!
Hello NFC!
 
Barcelona Bicing: Next steps
Barcelona Bicing: Next stepsBarcelona Bicing: Next steps
Barcelona Bicing: Next steps
 

Último

Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 

Último (20)

Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 

Hello GoogleMaps!

  • 2. Overview What's a Google Map? About MapActivity Build your own MapActivity Codesprint!
  • 4. What's 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
  • 5. I la ISO, què? What about the ISO? What's 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
  • 6. I la ISO, què? What about the ISO? What's 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
  • 7. What can we do with Google Maps? #CatDroid
  • 9. 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 Android's 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
  • 10. 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
  • 11. … so? Google APIs Add-On is an extension to the Android SDK development environment that lets you develop applications for devices that include Google's 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
  • 12. 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
  • 14. 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
  • 15. 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 Google's 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
  • 16. 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
  • 17. 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
  • 18. 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
  • 19. 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 android http://mobiforge.com/developing/story/using-google-maps-android #CatDroid
  • 20. 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
  • 21. 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
  • 22. 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, let's 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
  • 23. 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
  • 24. 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
  • 25. 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
  • 26. 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 class http://mobiforge.com/developing/story/using-google-maps-android #CatDroid
  • 27. More info: Great post where I found the data that I've 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
  • 28. 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
  • 29. Thanks for your attention! … and patience! rocboronat.net catdroid.org roc@rocboronat.net http://groups.google.com/group/CatDroid