style map

27 views
Skip to first unread message

Anatoliy Boronilo

unread,
Oct 4, 2016, 7:55:05 AM10/4/16
to nutit...@googlegroups.com
Hi!
We use nutiteq maps
Now was the map we have black, the documentation did not find how to change the map style
Help solve this problem.
Thanks!

Встроенное изображение 1

--
С ув. Анатолий 
Message has been deleted

aa...@cartodb.com

unread,
Oct 4, 2016, 11:15:01 AM10/4/16
to Nutiteq-dev, boron...@gmail.com
Hello!

You are right, there was, in fact, an issue with the default style file. It is now fixed and you can update your repository (you do need to clear cache, as we did not update the version):

To achieve that in Android Studio, execute the following:

# in home folder:
rm -r ~/.gradle/caches/*
# in project folder:
rm -r .gradle

And for cocoapod, exectute the following in your project's root:

rm -rf ~/Library/Caches/CocoaPods; rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install;

If you are not using dependency management or are using Xamarin Studio, you can simply download and replace your style file. Download nutibright-v3.zip from: https://developer.nutiteq.com/downloads

Best wishes,
Aare

Jaak Laineste

unread,
Oct 4, 2016, 1:43:04 PM10/4/16
to nutit...@googlegroups.com, boron...@gmail.com
Hi,

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



Jaak Laineste
Mobile Team Lead






On 04 Oct 2016, at 18:13, aa...@cartodb.com wrote:

Hello!

You are right, there was, in fact an issue with the default style file. It is now fixed and you can update your repository (you do need to clear cache, as we did not update the version):

To achieve that in Android Studio, execute the following:

# in home folder:
rm -r ~/.gradle/caches/*
# in project folder:
rm -r .gradle

And for cocoapod, exectute the following in your project's root:

rm -rf ~/Library/Caches/CocoaPods; rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install;

If you are not using dependency management or Xamarin, you can simply download and replace your style file. Download nutibright-v3.zip from: https://developer.nutiteq.com/downloads

Best wishes,
Aare

--
You received this message because you are subscribed to the Google Groups "Nutiteq-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nutiteq-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages