The package The trap.Simplified coding.Check places;
Import Android.Support.v4.App.scent;
Import Android..Bundle;
Import With.Google.Android.Village.The map.CameraUpdateFactory;
Import With.Google.Android.Village.The map.Google Maps;
Import With.Google.Android.Village.The map.OnMapReadyCallback;
Import With.Google.Android.Village.The map.SupportMapFragment;
Import With.Google.Android.Village.The map.The sample.Latling;
Import With.Google.Android.Village.The map.The sample.Marker;
public class Mapsactivity Is spread scent come into force OnMapReadyCallback {{
Private Google Maps mMap;
@Override
Protected Zero Go ahead()Bundle saveInstanceState) {{
Super.Go ahead()saveInstanceState);
setContentView()R.Layout.activity_maps);
SupportMapFragment Mapfragment = ()SupportMapFragment) getSupportFragmentManager())
.findFragmentById()R.Id.Map);
Mapfragment.getMapAsync()this);
}
@Override
public Zero onMapReady()Google Maps Google map) {{
mMap = Google map;
Latling Sydney = New Latling()–34, 151);
mMap.AddMarker()New Marker()).Post()Sydney).Title()“Markers in Sydney”));
mMap.Maneuver()CameraUpdateFactory.newLatLng()Sydney));
}
}
Source link