2011-04-11 18:23:27 +02:00
MAP_VIEW = """
< div class = " mapview " >
2011-10-28 14:03:31 +02:00
< a href = " /dataset/ %(name)s /map " > View available WMS layers & raquo ; < / a >
2011-04-11 18:23:27 +02:00
< / div >
"""
2011-09-30 12:33:36 +02:00
2012-05-22 11:51:44 +02:00
PACKAGE_MAP_BASIC = """
< div class = " dataset-map subsection " >
< div id = " dataset-map-container " > < / div >
% ( map_attribution ) s
< / div >
"""
PACKAGE_MAP_EXTENDED = """
2011-09-30 12:33:36 +02:00
< hr class = " cleared " / >
< div class = " dataset-map subsection " >
< h3 > % ( title ) s < / h3 >
< div id = " dataset-map-container " > < / div >
2012-04-27 14:06:20 +02:00
% ( map_attribution ) s
2011-09-30 12:33:36 +02:00
< / div >
"""
PACKAGE_MAP_EXTRA_HEADER = """
< link type = " text/css " rel = " stylesheet " media = " all " href = " /ckanext/spatial/css/dataset_map.css " / >
"""
PACKAGE_MAP_EXTRA_FOOTER = """
2012-04-27 14:06:20 +02:00
% ( js_library_links ) s
2011-09-30 12:33:36 +02:00
< script type = " text/javascript " src = " /ckanext/spatial/js/dataset_map.js " > < / script >
< script type = " text/javascript " >
/ / < ! [ CDATA [
$ ( document ) . ready ( function ( ) {
2012-04-27 14:06:20 +02:00
CKAN . DatasetMap . map_type = ' %(map_type)s ' ;
2011-09-30 12:33:36 +02:00
CKAN . DatasetMap . extent = ' %(extent)s ' ;
2012-05-22 11:51:44 +02:00
CKAN . DatasetMap . element = ' # %(element_id)s ' ;
2011-09-30 12:33:36 +02:00
CKAN . DatasetMap . setup ( ) ;
} )
/ / ] ] >
< / script >
"""
2011-12-13 18:40:47 +01:00
2012-01-18 12:03:21 +01:00
SPATIAL_SEARCH_FORM_EXTRA_HEADER = """
< link type = " text/css " rel = " stylesheet " media = " all " href = " /ckanext/spatial/css/spatial_search_form.css " / >
"""
SPATIAL_SEARCH_FORM_EXTRA_FOOTER = """
< script type = " text/javascript " src = " /ckanext/spatial/js/openlayers/OpenLayers_dataset_map.js " > < / script >
< script type = " text/javascript " src = " /ckanext/spatial/js/spatial_search_form.js " > < / script >
< script type = " text/javascript " >
/ / < ! [ CDATA [
$ ( document ) . ready ( function ( ) {
CKAN . SpatialSearchForm . bbox = ' %(bbox)s ' ;
2012-02-21 12:05:13 +01:00
CKAN . SpatialSearchForm . defaultExtent = ' %(default_extent)s ' ;
2012-01-18 12:03:21 +01:00
CKAN . SpatialSearchForm . setup ( ) ;
} )
/ / ] ] >
< / script >
"""
2011-12-13 18:40:47 +01:00
SPATIAL_SEARCH_FORM = """
2012-01-18 12:03:21 +01:00
< input type = " hidden " id = " ext_bbox " name = " ext_bbox " value = " %(bbox)s " / >
2012-02-22 18:25:06 +01:00
< input type = " hidden " id = " ext_prev_extent " name = " ext_prev_extent " value = " " / >
2012-01-18 12:03:21 +01:00
< div id = " spatial-search-show " > < a href = " # " class = " more " > Filter by location < / a > < / div >
< div id = " spatial-search-container " >
< div id = " spatial-search-map-container " >
2012-05-08 15:19:28 +02:00
< div id = " spatial-search-map " class = " span3 " > < / div >
< div id = " spatial-search-toolbar " class = " span3 " >
2012-05-08 15:00:19 +02:00
< input type = " button " id = " draw-box " value = " Select an area " class = " btn " / >
< input type = " button " id = " clear-box " value = " Clear " class = " btn " / >
2012-01-18 12:03:21 +01:00
< div class = " helper " > Click on the ' Select ' button to draw an area of interest . Use the map controls or the mouse wheel to zoom . Drag to pan the map . < / div >
< / div >
< / div >
2012-05-08 15:19:28 +02:00
< div class = " clearfix " > < / div >
2012-01-18 12:03:21 +01:00
< div id = " spatial-search-map-attribution " > Map data CC - BY - SA by < a href = " http://openstreetmap.org " > OpenStreetMap < / a > | Tiles by < a href = " http://www.mapquest.com " > MapQuest < / a > < / div >
< / div >
2011-12-13 18:40:47 +01:00
"""
2012-04-27 14:06:20 +02:00
MAP_ATTRIBUTION_OSM = """ <div id= " spatial-search-map-attribution " >Map data CC-BY-SA by <a href= " http://openstreetmap.org " >OpenStreetMap</a> | Tiles by <a href= " http://www.mapquest.com " >MapQuest</a></div> """