Android Custom marker icon

后端 未结 4 1276
离开以前
离开以前 2020-12-17 09:08

I\'m working on application with Google maps so i want to define a custom marker for each custom place, For example (gas station- Hotel- Hospital.. ) ! i have a overlays cla

4条回答
  •  無奈伤痛
    2020-12-17 09:42

    With the new Maps Api Setting the Icon for a Marker is done with the following Code:

    MarkerOptions markerOptions = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.icon_location));
    

    The icon can not be changed after a Marker was created. To change an icon remove the marker and readd it with a new image.

提交回复
热议问题