我该如何更改标记?

时间:2014-09-13 04:08:26

标签: java android eclipse gps marker

一位成员帮我解决了一些问题,但我需要将“标记”更改为我的小图片。

  String DESTINATION_LOCATION = "My location name";
    String latit = "37.925942";
    String longit = "23.938683";
    Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
    Uri.parse("geo:<"+latit+">,<"+longit+">?q=<"+latit+">,<"+longit+">("+DESTINATION_LOCATION+")")); //name the label
    startActivity(intent);

我该怎么做?


被修改

location.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {

                userMap.addMarker(new MarkerOptions()
                .position(new LatLng(37.925942, 23.938683))
                .title("You are Here")
                .icon(BitmapDescriptorFactory
                        .fromResource(R.drawable.lin)));
                startActivity(intent);
            }
        });

0 个答案:

没有答案