Skip to content

Android Library to generate marker with avatar for google map

License

Notifications You must be signed in to change notification settings

MostafaAnter/MarkerWithAvatar

Repository files navigation

MarkerWithAvatar

create google map marker with custom avatar

How to use

CustomMarker.Builder()
        .context(this)
        .avatar("https://pbs.twimg.com/profile_images/1248572477439016960/0EXyKwBK_400x400.jpg") //your avatar url
        .googleMap(mMap)
        .lat(29.9780115) // your latitude
        .long(31.13215)  // your longitude 
        .setMarkerBackground(R.drawable.black_marker) // for change marker background
        .build()

Download

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.MostafaAnter:MarkerWithAvatar:1.0'
}