There is also longer answer - why you got dark style. The style package nutibright-v3.zip has 3 styles, called bright (“style”), gray (“nutiteq_grey”) and dark (“nutiteq_dark”). If you create layer with explicit styling, then you can set the style, but if you use just style package, then one of the styles is taken automatically, which in your case was not expected one. Here you see also how you can configure style for specific language:
UnsignedCharVector styleBytes = AssetUtils.loadBytes("nutibright-v3.zip");
if (styleBytes != null){
// Create style set
MBVectorTileStyleSet vectorTileStyleSet = new MBVectorTileStyleSet(styleBytes); // Here you set the internal style
MBVectorTileDecoder vectorTileDecoder = new MBVectorTileDecoder(vectorTileStyleSet, "style");
// Set language, language-specific texts from vector tiles will be used
vectorTileDecoder.setStyleParameter("lang", "ru");
// Bright style set supports choosing between 2d/3d buildings. Set corresponding parameter.
if (styleAssetName.equals(MAIN_STYLE_FILE)) {
vectorTileDecoder.setStyleParameter("buildings3d", styleBuildings3D);
vectorTileDecoder.setStyleParameter("markers3d",styleBuildings3D ? "1" : "0");
vectorTileDecoder.setStyleParameter("texts3d",styleBuildings3D ? "1" : "0");
}
// Create tile data source for vector tiles
TileDataSource vectorTileDataSource = new NutiteqOnlineTileDataSource("nutiteq.osm");
// Remove old base layer, create new base layer, add to map
baseLayer = new VectorTileLayer(vectorTileDataSource, vectorTileDecoder);
mapView.getLayers().add(baseLayer);
} else {
Log.e(Const.LOG_TAG, "map style file must be in project assets: "+vectorStyleName);
}
However, in our new CARTO Mobile SDK it is much simpler, you create map layer as:
CartoOnlineVectorTileLayer layer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CARTO_BASEMAP_STYLE_DEFAULT);mapView.getLayers().add(layer);
Other built-in styles are referred as CartoBaseMapStyle.CARTO_BASEMAP_STYLE_DARK and CartoBaseMapStyle.CARTO_BASEMAP_STYLE_GRAY