diff --git a/externals/vts-libs b/externals/vts-libs
index 4a45bd5..4f4bd72 160000
--- a/externals/vts-libs
+++ b/externals/vts-libs
@@ -1 +1 @@
-Subproject commit 4a45bd5ad240065a2c8ddaf052d4f9b2051216f4
+Subproject commit 4f4bd72d402bab5c009a2a998fdc2d5b0e2c8076
diff --git a/mapproxy/src/mapproxy/CMakeLists.txt b/mapproxy/src/mapproxy/CMakeLists.txt
index 1c901c9..b6b57dc 100644
--- a/mapproxy/src/mapproxy/CMakeLists.txt
+++ b/mapproxy/src/mapproxy/CMakeLists.txt
@@ -155,6 +155,10 @@ file_to_cpp(mapproxy_CESIUM_SOURCES
cesium::cesium_js
cesium/cesium.js)
+file_to_cpp(mapproxy_CESIUM_SOURCES
+ cesium::melowntech_png
+ cesium/melown-technologies-logo-transparent-28.png)
+
add_executable(mapproxy
${mapproxy_SOURCES}
${mapproxy_BROWSER_SOURCES}
diff --git a/mapproxy/src/mapproxy/cesium.cpp b/mapproxy/src/mapproxy/cesium.cpp
index 58ad78f..d336eff 100644
--- a/mapproxy/src/mapproxy/cesium.cpp
+++ b/mapproxy/src/mapproxy/cesium.cpp
@@ -28,6 +28,7 @@
#include "cesium/cesium.html.hpp"
#include "cesium/cesium.js.hpp"
+#include "cesium/melown-technologies-logo-transparent-28.png.hpp"
namespace cesium {
@@ -47,6 +48,13 @@ const vtslibs::storage::SupportFile::Files supportFiles =
, cesium_js_attr_lastModified
, "application/javascript; charset=utf-8"
}
+ }, { "melowntech.png"
+ , {
+ melowntech_png
+ , sizeof(melowntech_png)
+ , melowntech_png_attr_lastModified
+ , "image/png"
+ }
}
};
diff --git a/mapproxy/src/mapproxy/cesium/cesium.js b/mapproxy/src/mapproxy/cesium/cesium.js
index 4089b09..ceb3263 100644
--- a/mapproxy/src/mapproxy/cesium/cesium.js
+++ b/mapproxy/src/mapproxy/cesium/cesium.js
@@ -33,9 +33,16 @@ function launchCesium(imageryProvider) {
, scene3DOnly: true
, navigationInstructionsInitiallyVisible: false
, selectionIndicator: false
+ , requestRenderMode : true
, imageryProvider: imageryProvider
, terrainProvider: terrainProvider
});
+
+ var melownCredit = new Cesium.Credit
+ (''
+ + ''
+ + '');
+ viewer.scene.frameState.creditDisplay.addDefaultCredit(melownCredit);
}
function resolveUrl(url, base) {
diff --git a/mapproxy/src/mapproxy/cesium/melown-technologies-logo-transparent-28.png b/mapproxy/src/mapproxy/cesium/melown-technologies-logo-transparent-28.png
new file mode 100644
index 0000000..a2edb79
Binary files /dev/null and b/mapproxy/src/mapproxy/cesium/melown-technologies-logo-transparent-28.png differ
diff --git a/mapproxy/src/mapproxy/generator/surface.cpp b/mapproxy/src/mapproxy/generator/surface.cpp
index 74d229a..46b97b5 100644
--- a/mapproxy/src/mapproxy/generator/surface.cpp
+++ b/mapproxy/src/mapproxy/generator/surface.cpp
@@ -29,6 +29,7 @@
#include
#include
#include
+#include
#include
@@ -39,6 +40,7 @@
#include "imgproc/rastermask/cvmat.hpp"
#include "imgproc/png.hpp"
+#include "vts-libs/registry/io.hpp"
#include "vts-libs/storage/fstreams.hpp"
#include "vts-libs/vts/io.hpp"
#include "vts-libs/vts/nodeinfo.hpp"
@@ -641,6 +643,12 @@ void SurfaceBase::layerJson(Sink &sink, const SurfaceFileInfo &fi) const
}
}
+ if (!r.credits.empty()) {
+ layer.attribution
+ = boost::lexical_cast
+ (utility::join(html(asInlineCredits(r)), "
"));
+ }
+
std::ostringstream os;
save(layer, os);
sink.content(os.str(), fi.sinkFileInfo());
diff --git a/mapproxy/src/mapproxy/support/tilejson.cpp b/mapproxy/src/mapproxy/support/tilejson.cpp
index 35b0e42..7bea187 100644
--- a/mapproxy/src/mapproxy/support/tilejson.cpp
+++ b/mapproxy/src/mapproxy/support/tilejson.cpp
@@ -102,6 +102,7 @@ void build(Json::Value &content, const LayerJson &layer)
build(content["available"], layer.available);
content["minzoom"] = layer.zoom.min;
content["maxzoom"] = layer.zoom.max;
+ build(content, "attribution", layer.attribution);
}
} // namespace
diff --git a/mapproxy/src/mapproxy/support/tilejson.hpp b/mapproxy/src/mapproxy/support/tilejson.hpp
index 326310e..e922837 100644
--- a/mapproxy/src/mapproxy/support/tilejson.hpp
+++ b/mapproxy/src/mapproxy/support/tilejson.hpp
@@ -65,6 +65,7 @@ struct LayerJson {
vts::LodRange zoom;
Available available;
std::vector tiles;
+ OString attribution;
LayerJson()
: tilejson(2, 0, 0), version(1, 0, 0), scheme(Scheme::xyz)