diff --git a/docs/Changelog.md b/docs/Changelog.md index 1d6fc592..b00ee76d 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -4,6 +4,7 @@ - S3DB layer [#475](https://github.com/mapsforge/vtm/pull/475) - OpenMapTiles GeoJSON vector tiles [#385](https://github.com/mapsforge/vtm/issues/385) +- Render theme fallback internal resources [#477](https://github.com/mapsforge/vtm/issues/477) - Many other minor improvements and bug fixes - [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.10.0) @@ -113,6 +114,7 @@ - Tile size based on scale factor [#183](https://github.com/mapsforge/vtm/issues/183) - libGDX layer gestures [#151](https://github.com/mapsforge/vtm/issues/151) - Render theme area tessellation option [#37](https://github.com/mapsforge/vtm/issues/37) +- Render theme resources optional location prefixes [#66](https://github.com/mapsforge/vtm/issues/66) - Graphics API platform enhancements [#92](https://github.com/mapsforge/vtm/issues/92) - GeoPoint & BoundingBox improvements [#201](https://github.com/mapsforge/vtm/issues/201) [#200](https://github.com/mapsforge/vtm/issues/200) - vtm-jts module [#53](https://github.com/mapsforge/vtm/issues/53) diff --git a/vtm/src/org/oscim/backend/CanvasAdapter.java b/vtm/src/org/oscim/backend/CanvasAdapter.java index d6871e1f..5d800c50 100644 --- a/vtm/src/org/oscim/backend/CanvasAdapter.java +++ b/vtm/src/org/oscim/backend/CanvasAdapter.java @@ -1,6 +1,6 @@ /* * Copyright 2013 Hannes Janetzek - * Copyright 2016-2017 devemux86 + * Copyright 2016-2018 devemux86 * Copyright 2017 Longri * * This file is part of the OpenScienceMap project (http://www.opensciencemap.org). @@ -166,6 +166,13 @@ public abstract class CanvasAdapter { inputStream = inputStreamFromAssets(relativePathPrefix, src); } + // Fallback to internal resources + if (inputStream == null) { + inputStream = inputStreamFromAssets("", src); + if (inputStream != null) + log.info("internal resource: " + src); + } + if (inputStream == null) { log.error("invalid resource: " + src); return null;