diff --git a/docs/Changelog.md b/docs/Changelog.md
index ae2e16622..41413895a 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -2,6 +2,7 @@
## Next version
+- Render themes: `map-background-outside` [#1262](https://github.com/mapsforge/vtm/pull/1262)
- `ThemeCallback.getColor` method [#1251](https://github.com/mapsforge/vtm/pull/1251)
- Map theme improvements
- Minor improvements and bug fixes
diff --git a/docs/Rendertheme.md b/docs/Rendertheme.md
index 8bf1fc9a2..844e089d8 100644
--- a/docs/Rendertheme.md
+++ b/docs/Rendertheme.md
@@ -76,13 +76,14 @@ At the moment, the following rendering instructions are available:
The following header elements can be used:
- `map-background`: a color value to set the color of a blank tile. This should not be used to set the color of the sea or land. Default is `#FFFFFF`.
+ - `map-background-outside`: a color value to set the color of the background of a map outside the map area. Effectively everything outside the map area will be overwritten by this color. For transparent layers, the color value will be ignored, but the outside area will be erased to transparent.
- `base-stroke-width`: set the basic width of strokes. Default is `1`.
- `base-text-scale`: set the overall text scale. Default is `1`.
```xml
+ xsi:schemaLocation="http://opensciencemap.org/rendertheme https://raw.githubusercontent.com/mapsforge/vtm/master/resources/rendertheme.xsd" version="1" map-background="#FFFCFA" map-background-outside="#DDDDDD">
…
```
diff --git a/resources/rendertheme.xsd b/resources/rendertheme.xsd
index f46c49c89..49b4e2977 100644
--- a/resources/rendertheme.xsd
+++ b/resources/rendertheme.xsd
@@ -354,6 +354,8 @@
+
diff --git a/vtm-themes/resources/assets/vtm/dark.xml b/vtm-themes/resources/assets/vtm/dark.xml
index d7fd3bbac..a6ddfff10 100644
--- a/vtm-themes/resources/assets/vtm/dark.xml
+++ b/vtm-themes/resources/assets/vtm/dark.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/default.xml b/vtm-themes/resources/assets/vtm/default.xml
index 34ec4565e..4c17c659d 100644
--- a/vtm-themes/resources/assets/vtm/default.xml
+++ b/vtm-themes/resources/assets/vtm/default.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/indigo.xml b/vtm-themes/resources/assets/vtm/indigo.xml
index 99304c7e5..baee0abc1 100644
--- a/vtm-themes/resources/assets/vtm/indigo.xml
+++ b/vtm-themes/resources/assets/vtm/indigo.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/mapzen.xml b/vtm-themes/resources/assets/vtm/mapzen.xml
index 578a1524a..c82c5f2c0 100644
--- a/vtm-themes/resources/assets/vtm/mapzen.xml
+++ b/vtm-themes/resources/assets/vtm/mapzen.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/motorider.xml b/vtm-themes/resources/assets/vtm/motorider.xml
index d21deeb83..b93884ec5 100644
--- a/vtm-themes/resources/assets/vtm/motorider.xml
+++ b/vtm-themes/resources/assets/vtm/motorider.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/newtron.xml b/vtm-themes/resources/assets/vtm/newtron.xml
index b0b97ef5b..f09c2d5ed 100644
--- a/vtm-themes/resources/assets/vtm/newtron.xml
+++ b/vtm-themes/resources/assets/vtm/newtron.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/openmaptiles.xml b/vtm-themes/resources/assets/vtm/openmaptiles.xml
index 0efd0d46a..7d7dd63f5 100644
--- a/vtm-themes/resources/assets/vtm/openmaptiles.xml
+++ b/vtm-themes/resources/assets/vtm/openmaptiles.xml
@@ -1,6 +1,6 @@
-
diff --git a/vtm-themes/resources/assets/vtm/osmarender.xml b/vtm-themes/resources/assets/vtm/osmarender.xml
index 6db2321f6..696444bc5 100644
--- a/vtm-themes/resources/assets/vtm/osmarender.xml
+++ b/vtm-themes/resources/assets/vtm/osmarender.xml
@@ -1,6 +1,6 @@
diff --git a/vtm-themes/resources/assets/vtm/tronrender.xml b/vtm-themes/resources/assets/vtm/tronrender.xml
index 40e24474f..6d9499e0d 100644
--- a/vtm-themes/resources/assets/vtm/tronrender.xml
+++ b/vtm-themes/resources/assets/vtm/tronrender.xml
@@ -1,6 +1,6 @@
diff --git a/vtm/src/org/oscim/map/Map.java b/vtm/src/org/oscim/map/Map.java
index 362f9d73e..139fed089 100644
--- a/vtm/src/org/oscim/map/Map.java
+++ b/vtm/src/org/oscim/map/Map.java
@@ -222,7 +222,7 @@ public void setTheme(IRenderTheme theme, boolean allLayers) {
throw new IllegalStateException();
}
- MapRenderer.setBackgroundColor(theme.getMapBackground());
+ MapRenderer.setBackgroundColor(theme.getMapBackgroundOutside());
clearMap();
}
diff --git a/vtm/src/org/oscim/theme/AtlasRenderTheme.java b/vtm/src/org/oscim/theme/AtlasRenderTheme.java
index a6e97543a..afe3fab76 100644
--- a/vtm/src/org/oscim/theme/AtlasRenderTheme.java
+++ b/vtm/src/org/oscim/theme/AtlasRenderTheme.java
@@ -27,14 +27,14 @@ public class AtlasRenderTheme extends RenderTheme {
private final Map