Changing colour of Markers - Google Map V2 Android

前端 未结 3 840
遇见更好的自我
遇见更好的自我 2021-02-05 00:06

I\'m having a little trouble understanding how to change the colour of a marker in an Android Google Map project.

My code for a Marker is:

googlemap.addM         


        
3条回答
  •  孤街浪徒
    2021-02-05 00:38

    You have a couple of characters wrong there. Compare your code to this:

    googlemap.addMarker(new MarkerOptions()
        .position(new LatLng( 65.07213,-2.109375))
        .title("This is my title")
        .snippet("and snippet")
        .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));
    

    Removed ) on third line, changed setSnippet to snippet and removed ; on forth line.

提交回复
热议问题