0

Hello Guys i have doubts regarding the android GPS and android maps.

1)i heard Android have both webview and native API to show maps? and if so does this mean i don't need internet connection when i am using native API's or even does it need data connection??

2)can i change color of map lets say for road routes its shows like blue color i want to lets say make it red is it possible???If yes can you please give me some links on this.

public class MainActivity extends Activity implements LocationListener{

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    LocationManager LocMgr = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    LocationListener LocLis = this;
    LocMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, LocLis);
}

@Override
public void onLocationChanged(Location Loc) {
    Loc.getLatitude();
    Loc.getLongitude();

    Toast.makeText(getApplicationContext(), (int) Loc.getLatitude(), Toast.LENGTH_LONG).show();
}

@Override
public void onProviderDisabled(String provider) {
    Toast.makeText(getBaseContext(), "OFF", Toast.LENGTH_LONG).show();
}

@Override
public void onProviderEnabled(String provider) {
    Toast.makeText(getBaseContext(), "ON", Toast.LENGTH_LONG).show();
}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}

Thank You!

wenn32
  • 1,256
  • 2
  • 17
  • 26

1 Answers1

0

Indeed you can show maps via web and native api. see for webview the following link: * https://developers.google.com/maps/articles/android_v3 Native got to: https://developers.google.com/maps/documentation/android/

For both you need internet connection and need to declare this in you're manifest.xml

Regarding different colors see the following link: * http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

and: Change roads color in "google maps android api v2"

Community
  • 1
  • 1
QVDev
  • 1,093
  • 10
  • 17
  • Thanks but i found this link http://stackoverflow.com/questions/8058787/custom-google-maps-styling-for-android.so do you think i can use this in my android app – wenn32 Mar 18 '13 at 13:16
  • Reading the above mentioned post it seem not posible – QVDev Mar 18 '13 at 13:41