diff --git a/ckanext/harvest/controllers/view.py b/ckanext/harvest/controllers/view.py index 05d50b7..219ad04 100644 --- a/ckanext/harvest/controllers/view.py +++ b/ckanext/harvest/controllers/view.py @@ -152,11 +152,10 @@ class ViewController(BaseController): def map_view(self,id): #check if package exists - pkg = Package.get(id) - if pkg is None: + c.pkg = Package.get(id) + if c.pkg is None: abort(404, 'Package not found') - c.url = pkg.url return render('ckanext/harvest/map.html') diff --git a/ckanext/harvest/html.py b/ckanext/harvest/html.py index ac87f9c..b6d29c7 100644 --- a/ckanext/harvest/html.py +++ b/ckanext/harvest/html.py @@ -1,5 +1,5 @@ MAP_VIEW="""
- View in map + View available WMS layers »
""" diff --git a/public/ckanext/harvest/js/mapviewer.js b/public/ckanext/harvest/js/mapviewer.js index 87625b2..a9f95fe 100644 --- a/public/ckanext/harvest/js/mapviewer.js +++ b/public/ckanext/harvest/js/mapviewer.js @@ -144,7 +144,7 @@ CKAN.MapViewer = function($){ OpenLayers.ImgPath = "/ckanext/harvest/js/openlayers/img/"; -OpenLayers.Lang.en.overlays = "Layers"; +OpenLayers.Lang.en.overlays = "Available Layers:"; OpenLayers.Control.CustomMousePosition = OpenLayers.Class(OpenLayers.Control.MousePosition,{ formatOutput: function(lonLat) { diff --git a/public/ckanext/harvest/mapviewer.css b/public/ckanext/harvest/mapviewer.css index c81bc1c..5e2c2c0 100644 --- a/public/ckanext/harvest/mapviewer.css +++ b/public/ckanext/harvest/mapviewer.css @@ -7,3 +7,13 @@ display: inline; margin-left: 20px; } + +/* OpenLayers */ +.dataLbl{ + font-weight: bold; + margin-bottom: 20px; +} + +.dataLayersDiv span{ + margin-left: 10px; +} diff --git a/templates/ckanext/harvest/map.html b/templates/ckanext/harvest/map.html index fb5e4ab..0d89926 100644 --- a/templates/ckanext/harvest/map.html +++ b/templates/ckanext/harvest/map.html @@ -3,7 +3,7 @@ xmlns:xi="http://www.w3.org/2001/XInclude" py:strip=""> - WMS preview + ${c.pkg.title or c.pkg.name} - WMS preview @@ -13,16 +13,34 @@
-

WMS preview

+

+ ${c.pkg.title} +

+ + +
+

+ Source: ${c.pkg.url} +

+
+

+ + Package details +

+
+

WMS preview

+