Android Open Source - SmartMap Google Map Activity From Project Back to project page SmartMap .
License The source code is released under:
Apache License
If you think the Android project SmartMap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.dennytech.smartmap.impl.google;
/ * w w w . j a v a 2 s . c o m * /
import android.content.Intent;
import android.os.Bundle;
import com.dennytech.smartmap.SMMapFragment;
import com.google.android.maps.MapActivity;
public abstract class GoogleMapActivity extends MapActivity {
protected SMMapFragment mMapFragment;
abstract protected SMMapFragment createFragment();
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
mMapFragment.onAttach(this );
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMapFragment = createFragment();
if (mMapFragment != null) {
mMapFragment.attachActivity(this );
mMapFragment.onCreate(savedInstanceState);
setContentView(mMapFragment.onCreateView(getLayoutInflater(),
savedInstanceState));
mMapFragment.onActivityCreated(savedInstanceState);
} else {
throw new IllegalAccessError(
"you must create a SMMapFragment first" );
}
}
@Override
protected void onStart() {
super.onStart();
mMapFragment.onStart();
}
@Override
protected void onResume() {
super.onResume();
mMapFragment.onResume();
}
@Override
protected void onPause() {
super.onPause();
mMapFragment.onPause();
}
@Override
protected void onStop() {
super.onStop();
mMapFragment.onStop();
}
@Override
protected void onDestroy() {
if (mMapFragment != null) {
mMapFragment.onDestroy();
}
super.onDestroy();
}
@Override
public void onDetachedFromWindow() {
mMapFragment.onDetach();
super.onDetachedFromWindow();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
mMapFragment.onActivityResult(requestCode, resultCode, data);
}
@Override
protected boolean isRouteDisplayed() {
return true;
}
}
Java Source Code List com.dennytech.smartmap.IGeoPoint.java com.dennytech.smartmap.IItemizedOverlay.java com.dennytech.smartmap.IMapController.java com.dennytech.smartmap.IMapFragment.java com.dennytech.smartmap.IMapViewLayoutParams.java com.dennytech.smartmap.IMapView.java com.dennytech.smartmap.IMyLocationOverlay.java com.dennytech.smartmap.IOverlayItem.java com.dennytech.smartmap.IOverlay.java com.dennytech.smartmap.IProjection.java com.dennytech.smartmap.ItemizedOverlayCallBack.java com.dennytech.smartmap.MapUtils.java com.dennytech.smartmap.MapViewCallback.java com.dennytech.smartmap.OverlayCallBack.java com.dennytech.smartmap.SMItemizedOverlay.java com.dennytech.smartmap.SMMapFragment.java com.dennytech.smartmap.SMMyLocationOverlay.java com.dennytech.smartmap.SMOverlay.java com.dennytech.smartmap.impl.autonavi.ANGeoPoint.java com.dennytech.smartmap.impl.autonavi.ANItemizedOverlay.java com.dennytech.smartmap.impl.autonavi.ANMapActivity.java com.dennytech.smartmap.impl.autonavi.ANMapController.java com.dennytech.smartmap.impl.autonavi.ANMapViewLayoutParams.java com.dennytech.smartmap.impl.autonavi.ANMapView.java com.dennytech.smartmap.impl.autonavi.ANMyLocationOverlay.java com.dennytech.smartmap.impl.autonavi.ANOverlayItem.java com.dennytech.smartmap.impl.autonavi.ANOverlay.java com.dennytech.smartmap.impl.autonavi.ANProjection.java com.dennytech.smartmap.impl.autonavi.myANMapView.java com.dennytech.smartmap.impl.google.GoogleGeoPoint.java com.dennytech.smartmap.impl.google.GoogleItemizedOverlay.java com.dennytech.smartmap.impl.google.GoogleMapActivity.java com.dennytech.smartmap.impl.google.GoogleMapController.java com.dennytech.smartmap.impl.google.GoogleMapView.java com.dennytech.smartmap.impl.google.GoogleMyLocationOverlay.java com.dennytech.smartmap.impl.google.GoogleOverlayItem.java com.dennytech.smartmap.impl.google.GoogleOverlay.java com.dennytech.smartmap.impl.google.GoogleProjection.java com.dennytech.smartmap.impl.google.myGoogleMapView.java