public class APMapboxLayer extends APLayer { private MapView mMapView; public APMapboxLayer(final Context context, final LayerDataSource data, final float density, final float scale, final View.OnClickListener hotspotClickListener) { super(context, data, density, hotspotClickListener); String mapId = data.getMapId(); if (mapId == null) { return; } mMapView = new MapView(context); mMapView.setTileSource(new MapboxTileLayer(mapId)); setView(mMapView); } }