Search in sources :

Example 1 with MyLocationOverlay

use of com.google.android.maps.MyLocationOverlay in project cw-advandroid by commonsguy.

the class NooYawk method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    map = (MapView) findViewById(R.id.map);
    map.getController().setCenter(getPoint(40.76793169992044, -73.98180484771729));
    map.getController().setZoom(17);
    map.setBuiltInZoomControls(true);
    sites = new SitesOverlay();
    map.getOverlays().add(sites);
    me = new MyLocationOverlay(this, map);
    map.getOverlays().add(me);
}
Also used : MyLocationOverlay(com.google.android.maps.MyLocationOverlay)

Example 2 with MyLocationOverlay

use of com.google.android.maps.MyLocationOverlay in project cw-advandroid by commonsguy.

the class NooYawk method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    map = (MapView) findViewById(R.id.map);
    map.getController().setCenter(getPoint(40.76793169992044, -73.98180484771729));
    map.getController().setZoom(17);
    map.setBuiltInZoomControls(true);
    Drawable marker = getResources().getDrawable(R.drawable.marker);
    marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
    map.getOverlays().add(new SitesOverlay(marker));
    me = new MyLocationOverlay(this, map);
    map.getOverlays().add(me);
}
Also used : MyLocationOverlay(com.google.android.maps.MyLocationOverlay) Drawable(android.graphics.drawable.Drawable)

Example 3 with MyLocationOverlay

use of com.google.android.maps.MyLocationOverlay in project cw-android by commonsguy.

the class NooYawk method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    map = (MapView) findViewById(R.id.map);
    map.getController().setCenter(getPoint(40.76793169992044, -73.98180484771729));
    map.getController().setZoom(17);
    map.setBuiltInZoomControls(true);
    Drawable marker = getResources().getDrawable(R.drawable.marker);
    marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
    map.getOverlays().add(new SitesOverlay(marker));
    me = new MyLocationOverlay(this, map);
    map.getOverlays().add(me);
}
Also used : MyLocationOverlay(com.google.android.maps.MyLocationOverlay) Drawable(android.graphics.drawable.Drawable)

Example 4 with MyLocationOverlay

use of com.google.android.maps.MyLocationOverlay in project cw-android by commonsguy.

the class MapFragment method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    map = new MapView(getActivity(), "0mjl6OufrY-tHs6WFurtL7rsYyEMpdEqBCbyjXg");
    map.setClickable(true);
    map.getController().setCenter(getPoint(40.76793169992044, -73.98180484771729));
    map.getController().setZoom(17);
    map.setBuiltInZoomControls(true);
    Drawable marker = getResources().getDrawable(R.drawable.marker);
    marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
    map.getOverlays().add(new SitesOverlay(marker));
    me = new MyLocationOverlay(getActivity(), map);
    map.getOverlays().add(me);
    ((ViewGroup) getView()).addView(map);
}
Also used : MyLocationOverlay(com.google.android.maps.MyLocationOverlay) ViewGroup(android.view.ViewGroup) Drawable(android.graphics.drawable.Drawable) MapView(com.google.android.maps.MapView)

Example 5 with MyLocationOverlay

use of com.google.android.maps.MyLocationOverlay in project cw-advandroid by commonsguy.

the class NooYawk method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    map = (MapView) findViewById(R.id.map);
    map.getController().setCenter(getPoint(40.76793169992044, -73.98180484771729));
    map.getController().setZoom(17);
    map.setBuiltInZoomControls(true);
    Drawable marker = getResources().getDrawable(R.drawable.marker);
    marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
    map.getOverlays().add(new SitesOverlay(marker));
    me = new MyLocationOverlay(this, map);
    map.getOverlays().add(me);
}
Also used : MyLocationOverlay(com.google.android.maps.MyLocationOverlay) Drawable(android.graphics.drawable.Drawable)

Aggregations

MyLocationOverlay (com.google.android.maps.MyLocationOverlay)7 Drawable (android.graphics.drawable.Drawable)5 ViewGroup (android.view.ViewGroup)1 MapView (com.google.android.maps.MapView)1