From 8ae195065b118b1a020cb5df8d45457cfecf419a Mon Sep 17 00:00:00 2001 From: Boney Bun Date: Wed, 18 Oct 2017 12:09:30 +0700 Subject: [PATCH] bug fix embed widget (#345) * bug fix embed widget, the previous code still encountered problem with CORS * fix travis error * embed widget link for qgis-server and geoserver backend * embed widget link and add copy button * refactor map projection on the frontend into django views fix #152 --- .../leaflet_maps/map_embed_widget.html | 53 +++++++++++++ geonode/maps/templates/maps/map_detail.html | 41 +++++----- geonode/maps/urls.py | 1 + geonode/maps/views.py | 75 ++++++++++++++++++- geonode/settings.py | 2 +- .../static/geonode/js/utils/clipboard.min.js | 7 ++ 6 files changed, 159 insertions(+), 20 deletions(-) create mode 100644 geonode/maps/templates/leaflet_maps/map_embed_widget.html create mode 100755 geonode/static/geonode/js/utils/clipboard.min.js diff --git a/geonode/maps/templates/leaflet_maps/map_embed_widget.html b/geonode/maps/templates/leaflet_maps/map_embed_widget.html new file mode 100644 index 00000000000..534eada5cff --- /dev/null +++ b/geonode/maps/templates/leaflet_maps/map_embed_widget.html @@ -0,0 +1,53 @@ +
+ + + + + + +
+
\ No newline at end of file diff --git a/geonode/maps/templates/maps/map_detail.html b/geonode/maps/templates/maps/map_detail.html index 3b04afa9555..3b8a724c29c 100644 --- a/geonode/maps/templates/maps/map_detail.html +++ b/geonode/maps/templates/maps/map_detail.html @@ -289,26 +289,11 @@ @@ -328,7 +313,27 @@ {% overall_rating resource "map" as the_map_rating %} {% endif %} {% include 'rating.html' %} +