Posts

Showing posts with the label Google Map

Android: R.drawable.androidmarker not found

Image
Found this while following through the Android Hello-MapView guide at developer.android.com . Theres this particular line at when you copy over into your code, it will give you error for the " R.drawable.androidmarker cannot be resolved ". mapOverlays = mapView . getOverlays (); drawable = this . getResources (). getDrawable ( R . drawable . androidmarker ); itemizedoverlay = new HelloItemizedOverlay ( drawable ); You can solve this easily by replacing "androidmarker" with "icon", which shown in the code below. mapOverlays = mapView.getOverlays(); drawable = this.getResources().getDrawable(R.drawable.icon); itemizedoverlay = new HelloItemizedOverlay(drawable); Note that I am using the default "Icon" for application here. As a result, you will get the icon shown in the image below - the application icon. :) Actually, you can call the other default icons listed in Android API by calling android.R.drawable class. For example, mapOve...

Android: Using GPS and Google Map

Image
This is a step-by-step guide for beginners to follow and learn about Androids and Google Maps. Creating the Project Using Eclipse, create a new Android project. To use GPS functionality in your Android application, you'll need to add the ACCESS_FINE_LOCATION permission to the AndroidManifest.xml file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"       package="com.coalition"       android:versionCode="1"       android:versionName="1.0">     <application android:icon="@drawable/icon" android:label="@string/app_name">         <activity android:name=".CoalitionActivity"                   android:label="@string/app_name">             <intent-filter>                 ...