大家好我想在地图上画圆圈并拿走它们的坐标 这是我的下面的代码,那么什么是声明,我在哪里可以将它写在我的代码中以获取坐标
请帮忙 感谢
public class Map extends Activity implements OnMapClickListener{
final int RQS_GooglePlayServices = 1;
private GoogleMap myMap;
Circle myCircle;
@Override
protected void onCreate(Bundle savedInstanceState) {
//TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
FragmentManager myFragmentManager = getFragmentManager();
MapFragment myMapFragment = (MapFragment)myFragmentManager.findFragmentById(R.id.map);
myMap = myMapFragment.getMap();
myMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
myMap.setOnMapClickListener(this);
myMap.setMyLocationEnabled(true);
myMap.setBuildingsEnabled(true);
}
@Override
public void onMapClick(LatLng point) {
int b=3;
CircleOptions circleOptions = new CircleOptions()
.center(point) //set center
.radius(500) //set radius in meters
.fillColor(Color.TRANSPARENT) //default
.strokeColor(Color.BLUE)
.strokeWidth(5);
myCircle = myMap.addCircle(circleOptions);
}
}