0
我尝试使用NativeScript和Google maps API包创建带有自定义图标的标记。我将我的图标添加到了android资源中,并为我的项目创建了几次。Google Maps API NativeScript自定义标记图标
var marker = new mapsModule.Marker();
marker.position = mapsModule.Position.positionFromLatLng(result.latitude, result.longitude);
marker.title = "Home";
var icon = new Image();
icon.imageSource = imageSource.fromResource('bot_marker');
marker.icon = icon;
marker.snippet = "This is where I live";
marker.userData = { index: 1 };
mapView.addMarker(marker);
即使当我尝试“图标”或“徽标”的资源它不会出现。