diff --git a/ingc_geonode_theme/settings.py b/ingc_geonode_theme/settings.py index aeae6d3..59a6b10 100644 --- a/ingc_geonode_theme/settings.py +++ b/ingc_geonode_theme/settings.py @@ -126,3 +126,34 @@ ('pt', 'Portuguese'), ('en', 'English'), ) + +LEAFLET_CONFIG['TILES'] = { + ('OpenStreetMap', + 'http://{s}.tile.osm.org/{z}/{x}/{y}.png', + '© OpenStreetMap ' + 'contributors'), + ('Watercolor', + 'http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', + 'Map tiles by Stamen Design, \ + CC BY 3.0 \ + — Map data © \ + OpenStreetMap contributors, \ + \ + CC-BY-SA'), + ('Terrain', + 'http://a.tile.stamen.com/terrain/{z}/{x}/{y}.png', + 'Map tiles by Stamen Design, \ + CC BY 3.0 \ + — Map data © \ + OpenStreetMap contributors, \ + \ + CC-BY-SA'), + ('Toner Lite', + 'http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', + 'Map tiles by Stamen Design, \ + CC BY 3.0 \ + — Map data © \ + OpenStreetMap contributors, \ + \ + CC-BY-SA'), +} diff --git a/ingc_geonode_theme/templates/leaflet/layers/layer_leaflet_map.html b/ingc_geonode_theme/templates/leaflet/layers/layer_leaflet_map.html new file mode 100644 index 0000000..08f6154 --- /dev/null +++ b/ingc_geonode_theme/templates/leaflet/layers/layer_leaflet_map.html @@ -0,0 +1,364 @@ +{% load leaflet_tags %} +{% load i18n %} + +{% leaflet_js %} +{% leaflet_css %} + + + + +{% if OGC_SERVER.default.BACKEND == 'geonode.qgis_server' %} + + +{% endif %} diff --git a/ingc_geonode_theme/templates/leaflet/maps/map_detail.html b/ingc_geonode_theme/templates/leaflet/maps/map_detail.html new file mode 100644 index 0000000..4b9c10c --- /dev/null +++ b/ingc_geonode_theme/templates/leaflet/maps/map_detail.html @@ -0,0 +1,709 @@ +{% extends "maps/map_base.html" %} +{% load leaflet_tags %} +{% load i18n %} +{% load dialogos_tags %} +{% load agon_ratings_tags %} +{% load base_tags %} +{% load guardian_tags %} +{% load client_lib_tags %} + +{% block title %}{{ resource.title }} — {{ block.super }}{% endblock %} + +{% block head %} + +{% leaflet_js %} +{% leaflet_css %} + + {% if TWITTER_CARD %} + {% include "base/_resourcebase_twittercard.html" %} + {% endif %} + {% if OPENGRAPH_ENABLED %} + {% include "base/_resourcebase_opengraph.html" %} + {% endif %} + + {{ block.super }} +{% endblock %} + +{% block body_outer %} + {% overall_rating resource "map" as map_rating %} + + + +
+
+ +
+
+
+ +
+ {% include "_actions.html" %} +
+ +
+ + {% block social_links %} + {% if DISPLAY_SOCIAL %} + {% include "social_links.html" %} + {% endif %} + {% endblock %} + + {% if DISPLAY_COMMENTS %} +
+ {% include "_comments.html" %} +
+ {% endif %} + + {% if DISPLAY_RATINGS %} +
+ + {% if request.user.is_authenticated %} +

{% trans "Rate this Map" %}

+ {% user_rating request.user resource "map" as user_map_rating %} +
+ {% endif %} +

{% trans 'Average Rating' %}

+ {% overall_rating resource "map" as map_rating %} + {% num_ratings resource as num_votes %} +
({{num_votes}}) +
+ {% endif %} +
+
+ +
+ +
+
+ + + + + {% endblock %} + +{% block extra_script %} + +{{ block.super }} +{% if DISPLAY_SOCIAL %} + {% include 'facebook_sdk.html' %} +{% endif %} +{% if request.user.is_authenticated %} + {% user_rating_js request.user resource "map" %} +{% else %} + {% overall_rating resource "map" as the_map_rating %} +{% endif %} +{% include 'rating.html' %} + +{% include "_permissions_form_js.html" %} + + + +{% endblock %} diff --git a/ingc_geonode_theme/templates/leaflet/maps/map_view.html b/ingc_geonode_theme/templates/leaflet/maps/map_view.html new file mode 100644 index 0000000..cb2f204 --- /dev/null +++ b/ingc_geonode_theme/templates/leaflet/maps/map_view.html @@ -0,0 +1,626 @@ +{% extends "geonode_base.html" %} +{% load bootstrap_tags %} +{% load staticfiles %} +{% load i18n %} +{% load leaflet_tags %} + +{% block title %} + {% trans "GeoExplorer" %} - {{ block.super }} +{% endblock title %} + +{% block head %} + {{ block.super }} +{% endblock head %} + +{% block extra_head %} + {% leaflet_css %} + + + + + + +{% endblock extra_head %} + +{% block body %} + + + +
+
+
+
+
+ + + +
+

Map layers

+
+
    +
+ +
+

Background layers

+
+
    +
+
+
+ + {# #} + {# #} +
+
+
+ +
+
+
+
+
+
+ + +{% endblock body %} + +{% block footer %} + +{% endblock footer %} + +{% block extra_script %} +{{ block.super }} + {% leaflet_js %} + + + + + + + + +{% endblock extra_script %}