我正在使用安卓系统的HereMaps软件开发工具包的高级版。有没有办法设置路线线的粗细?我可以用MapRoute类的color & traveledColor属性来改变颜色,但是我找不到任何关于厚度的属性。

发布于 2020-05-04 16:56:08
请在"https://developer.here.com/documentation/android-premium/3.11/api_reference_java/com/here/android/mpa/mapping/MapPolyline.html“处检查MapPolyline类,
它使用setLineWidth方法设置宽度。
setLineWidth(int width)
Sets a line width, in pixels, for this MapPolyline, an int value within the [0..100] range. 发布于 2021-05-23 07:28:42
如果你真的想使用MapRoute,你可以使用CustomizableScheme:
CustomizableScheme scheme = map.createCustomizableScheme("newCustomScheme", Map.Scheme.NORMAL_DAY);
scheme.setVariableValue(CustomizableVariables.RouteStyle.ROUTESTYLE_1_WIDTH , *Width in pixels* , range);您可以检查CustomizableVariables.RouteStyle类
如果要通过以下方式使用多段线,可以尝试执行以下操作:
MapPolyline mp = new MapPolyline(new GeoPolyline(route.getRouteGeometry()));
mp.setLineWidth(20);
map.addMapObject(mp);https://stackoverflow.com/questions/61586976
复制相似问题