diff --git a/ckanext/spatial/public/css/dataset_map.css b/ckanext/spatial/public/css/dataset_map.css index e43a760..576d2c1 100644 --- a/ckanext/spatial/public/css/dataset_map.css +++ b/ckanext/spatial/public/css/dataset_map.css @@ -1,30 +1,23 @@ +/* Side bar */ .module-narrow #dataset-map-container{ height: 200px; } -.module-content #dataset-map-container{ +/* Primary content */ + +.dataset-map-section-20x { + padding: 0 25px; + margin: 20px 0; +} + +.dataset-map #dataset-map-container{ height: 250px; } #dataset-map-attribution{ - font-size: x-small; + font-size: x-small; } .module-narrow #dataset-map-attribution{ margin-left: 3px; } - -.olControlAttribution { - left: 5px; - right: inherit; - bottom: 3px !important; -} - -#dataset-map-container div.olControlAttribution { - font-size: 9px; - font-family: helvetica,tahoma,verdana,sans-serif; - line-height: 12px; - left: 5px; - bottom: 3px; - color: #666; -} diff --git a/ckanext/spatial/templates/spatial/snippets/dataset_map.html b/ckanext/spatial/templates/spatial/snippets/dataset_map.html index 6128e35..7034f50 100644 --- a/ckanext/spatial/templates/spatial/snippets/dataset_map.html +++ b/ckanext/spatial/templates/spatial/snippets/dataset_map.html @@ -12,9 +12,8 @@ extent {% endif %} #} -
-
-

{{ _('Dataset extent') }}

- {% snippet "spatial/snippets/dataset_map_base.html", extent=extent %} -
-
+ +
+

{{ _('Dataset extent') }}

+ {% snippet "spatial/snippets/dataset_map_base.html", extent=extent %} +
diff --git a/doc/spatial-search.rst b/doc/spatial-search.rst index 2223dff..dabca99 100644 --- a/doc/spatial-search.rst +++ b/doc/spatial-search.rst @@ -197,7 +197,7 @@ the main body of the dataset details page, but these can be easily modified to suit your project needs To add a map to the sidebar, add this to the dataset details page template (eg -``myproj/ckanext/myproj/templates/package/read.html``):: +``ckanext-myproj/ckanext/myproj/templates/package/read.html``):: {% block secondary_content %} {{ super() }} @@ -211,23 +211,17 @@ To add a map to the sidebar, add this to the dataset details page template (eg For adding the map to the main body, add this:: - {% block primary_content %} + {% block primary_content_inner %} - + {{ super() }} -
+ {% set dataset_extent = h.get_pkg_dict_extra(c.pkg_dict, 'spatial', '') %} + {% if dataset_extent %} + {% snippet "spatial/snippets/dataset_map.html", extent=dataset_extent %} + {% endif %} - - - {% set dataset_extent = h.get_pkg_dict_extra(c.pkg_dict, 'spatial', '') %} - {% if dataset_extent %} - {% snippet "spatial/snippets/dataset_map.html", extent=dataset_extent %} - {% endif %} - -
{% endblock %} - You need to load the ``spatial_metadata`` plugin to use these snippets. Legacy Search