将您的图钉图像设置为标记,这称为自定义标记
@Override
public void onMapReady(GoogleMap googleMap) {
BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.pin);
LatLng latLng = new LatLng(21.4225, 39.8262);
googleMap.addMarker(new MarkerOptions().position(latLng).title("Mecca").icon(icon)).showInfoWindow();
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句