Changing colour of Markers - Google Map V2 Android

前端 未结 3 842
遇见更好的自我
遇见更好的自我 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:47

    {
        googleMap.addMarker(new MarkerOptions()
             .position(new LatLng(19.01062463, 73.01141475))
             .title("Point1").snippet("Speed=1.2")
             .icon(bitmapDescriptorFromVector(context, R.drawable.ic_icon)));
    }
    
    googleMap.addMarker(new MarkerOptions()
        .position(new LatLng(19.02369039, 73.00778391))
        .title("Point2")
        .snippet("Speed2=0.42").icon(bitmapDescriptorFromVector(context, R.drawable.ic_icon)));
    

提交回复
热议问题