Search code examples
androidcolorsgoogle-maps-android-api-2marker

Android map marker color?


What color is available to make a marker on Android map?
How many colors are there and how to write the code of color?


Solution

  • This is how to make a default marker

    Marker melbourne = mMap.addMarker(new MarkerOptions().position(MELBOURNE)
        .icon(BitmapDescriptorFactory
            .defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));
    

    and these are the constants you can use

    float   HUE_AZURE   
    float   HUE_BLUE    
    float   HUE_CYAN    
    float   HUE_GREEN   
    float   HUE_MAGENTA 
    float   HUE_ORANGE  
    float   HUE_RED 
    float   HUE_ROSE    
    float   HUE_VIOLET  
    float   HUE_YELLOW