I have to display custom icon for the marker in the mapbox.
I am trying with this code :
IconFactory mIconFactory = IconFactory.getInstance(this);
Drawable mIconDrawable = ContextCompat.getDrawable(this, R.drawable.ic_directions_boat_black_18dp);
Icon icon = mIconFactory.fromDrawable(mIconDrawable);
Problem: with IconFactory i.e shows there is no class for IconFactory.
And for the marker
mapView.addMarker(new MarkerOptions()
.position(new LatLng(latitude, longitude)
.icon())
When I was trying with this above marker code Getting
Problem : there is no code for icon().
I am using
compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:2.1.0@aar') {
transitive = true
}
in the build.gradle.
I thought my problem is with this map box library. Can you please help me. Thanks in Advance.
You can see my code here.