Permalink
Browse files

Render themes: fallback internal resources, fix #1026

  • Loading branch information...
devemux86 committed Jan 9, 2018
1 parent 6cb46ae commit 0087a943da2e0fe8d8aaaca7b95b239268274181
Showing with 16 additions and 2 deletions.
  1. +7 −1 docs/Changelog.md
  2. +9 −1 mapsforge-map/src/main/java/org/mapsforge/map/rendertheme/XmlUtils.java
View
@@ -1,5 +1,11 @@
# Changelog
## New since 0.9.1
- Render theme fallback internal resources [#1026](https://github.com/mapsforge/mapsforge/issues/1026)
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.10.0)
## Version 0.9.1 (2018-01-04)
- Gradle fix transitive dependencies [#1009](https://github.com/mapsforge/mapsforge/issues/1009)
@@ -62,7 +68,7 @@
- mapsforge-themes module [#848](https://github.com/mapsforge/mapsforge/issues/848)
- New default internal render theme [#903](https://github.com/mapsforge/mapsforge/issues/903)
- Internal render themes new SVG resources [#904](https://github.com/mapsforge/mapsforge/issues/904)
- Render theme resources without location prefixes [#847](https://github.com/mapsforge/mapsforge/issues/847)
- Render theme resources optional location prefixes [#847](https://github.com/mapsforge/mapsforge/issues/847)
- SpatiaLite natives published artifacts [#849](https://github.com/mapsforge/mapsforge/issues/849)
- SNAPSHOT builds publish to Sonatype OSSRH [#873](https://github.com/mapsforge/mapsforge/issues/873)
- Deprecate Maven build [#852](https://github.com/mapsforge/mapsforge/issues/852)
@@ -1,7 +1,7 @@
/*
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2014-2016 devemux86
* Copyright 2014-2018 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -169,6 +169,14 @@ private static InputStream createInputStream(GraphicFactory graphicFactory, Stri
}
}
// Fallback to internal resources
if (inputStream == null) {
inputStream = inputStreamFromJar("/assets/", src);
if (inputStream != null) {
LOGGER.info("internal resource: " + src);
}
}
if (inputStream != null) {
return inputStream;
}

0 comments on commit 0087a94

Please sign in to comment.