Set map marker to a custom color Android -


I am a made app that connects to pin on some points I paint your PIN theme colors of our app Want to mail Sorry, I'm actually a noob

  int color = Color.rgb (255, 201, 14); Mapeepi = ((Mapfragment) getFragmentManager (). FindFragmentById (R.id.map)). GetMap (); Last letting PERTH = new wave long (40, -80); Marker Perth = mMap.addMarker (New MarkerOptions () .position (Perth) .title ( "My PIN") .snippet (eats "MAGGIE snakeskin") .draggable (right) .icon (BitmapDescriptorFactory.fromResource (R. drawable. pin)) Kinon (Bitmapdiskriptrficr. default marker (Bitmapdiskriptrfitr. Kolor)));  

.inon (Bitmapdiskriptrficr. Default marker (Bitmapdiskriptrfractorcolor))); Does not work This will not allow me to add a custom color here. How can I do this? Thank you :)

postprop = "text">

defaultMarker () method allows custom colors to be set but only in accordance with the Android documentation by providing value color:

(hue) value greater than 0 and less than 360

Did you know that the hex or RGB value should be equal to your app subject, you need to do some calculation (see) or just use something in your case color The value will be 47.

In addition, there is no need to install .icon in your code twice (there).


Comments