SlidePub
Home
Categories
Login
Register
Home
Business
Maps in android
Maps in android
763 views
12 slides
Sep 14, 2016
Slide
1
of 12
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
About This Presentation
How Maps are created in Android Apps? Basic functions are described here.
Size:
152.54 KB
Language:
en
Added:
Sep 14, 2016
Slides:
12 pages
Slide Content
Slide 1
MAPS IN ANDROID By- Sumita Das Copyright © Sumita Das All Rights Reserved
Slide 2
Android allows us to integrate Google maps in our application. Customize the map according to your choices. Introduction Copyright © Sumita Das All Rights Reserved
Slide 3
S everal classes that are used to support Android maps: MapView : U ser interface element that displays the map. MapActivity : Base class used to create an Activity that can include a Map View. Overlay : Class used to annotate your maps MapController : U sed to control the map, and enables the user to set the center location and zoom levels. MyLocationOverlay : Can be used to display the current position and orientation of the device. Introducing Map View and Map Activity Copyright © Sumita Das All Rights Reserved
Slide 4
Obtain an API key from the Android developer website at http://code.google.com/android/maps-api-signup.html . To obtain a key, you need to specify the MD5 fingerprint of the certificate used to sign your application. . Getting Your Maps API Key Copyright © Sumita Das All Rights Reserved
Slide 5
To use maps- extend MapActivity . The layout for the new class must then include a MapView to display a Google Maps interface element. Android maps library - optional API. So it must be explicitly included in the application manifest before it can be used. Creating a Map-Based Activity <uses-library android:name=” com.google.android.maps ”/> Copyright © Sumita Das All Rights Reserved
Slide 6
Map View : -Downloads its map tiles on demand - Any application that features a Map View needs to include a uses-permission for Internet access. Add a uses-permission tag to your application manifest for INTERNET, as shown here : After adding the library and configuring your permission, you’re ready to create your new map-based Activity. Creating a Map-Based Activity <uses-permission android:name=”android.permission.INTERNET”/> Copyright © Sumita Das All Rights Reserved
Slide 7
A map Activity layout resource <?xml version=”1.0” encoding=”utf-8”?> < LinearLayout xmlns:android =”http://schemas.android.com/apk/res/android” android:orientation =”vertical” android:layout_width =” fill_parent ” android:layout_height =” fill_parent ”> < com.google.android.maps.MapView android:id =”@+id/ map_view ” android:layout_width =” fill_parent ” android:layout_height =” fill_parent ” android:enabled =”true” android:clickable =”true” android:apiKey =” mymapapikey ”/> </ LinearLayout > Copyright © Sumita Das All Rights Reserved
Slide 8
Framework for creating a new map-based Activity. import com.google.android.maps.MapActivity ; // import classes import com.google.android.maps.MapController ; import com.google.android.maps.MapView ; import android.os.Bundle ; public class MyMapActivity extends MapActivity { private MapView mapView ; private MapController mapController ; @Override public void onCreate (Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); setContentView ( R.layout.map_layout ); mapView = ( MapView ) findViewById ( R.id.map_view ); } @Override protected boolean isRouteDisplayed () { // IMPORTANT: This method must return true if your Activity is displaying driving directions. Otherwise return false. return false; }} Copyright © Sumita Das All Rights Reserved
Slide 9
Example of a basic map-based Activity Copyright © Sumita Das All Rights Reserved
Slide 10
1. To display a satellite view and the expected traffic overlay: mapView.setSatellite (true); mapView.setTraffic (true); 2. To find the current and maximum available zoom levels: int maxZoom = mapView.getMaxZoomLevel (); int currentZoom = mapView.getZoomLevel (); Configuring and Using Map Views Copyright © Sumita Das All Rights Reserved
Slide 11
3. To obtain center point and currently visible longitude and latitude span (in decimal degrees). GeoPoint center = mapView.getMapCenter (); int latSpan = mapView.getLatitudeSpan (); int longSpan = mapView.getLongitudeSpan (); Copyright © Sumita Das All Rights Reserved
Slide 12
[1]Wei- Meng Lee, “Beginning Android Application Development”, Wiley Publishing Inc. Copyright © Sumita Das All Rights Reserved
Tags
information technology
engineering
technology
mobile apps
mobile
study
Categories
Business
Education
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
763
Slides
12
Favorites
2
Age
3365 days
Related Slideshows
1
DTI BPI Pivot Small Business - BUSINESS START UP PLAN
MeljunCortes
28 views
1
CATHOLIC EDUCATIONAL Corporate Responsibilities
MeljunCortes
30 views
11
Karin Schaupp – Evocation; lançamento: 2000
alfeuRIO
28 views
10
Pillars of Biblical Oneness in the Book of Acts
JanParon
26 views
31
7-10. STP + Branding and Product & Services Strategies.pptx
itsyash298
27 views
44
Business Legislation PPT - UNIT 1 jimllpkggg
slogeshk98
29 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-12)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better