diff --git a/app/main.py b/app/main.py index a5fa547..57eec28 100644 --- a/app/main.py +++ b/app/main.py @@ -83,7 +83,7 @@ def custom_openapi(): return app.openapi_schema openapi_schema = get_openapi( title="pyagsapi - AGS File Utilities Tools and API", - version="4.5.2", + version="4.5.3", description=("The API performs schema validation, data validation and conversion of your AGS files. " "It also exports a graphical log from AGS data held by NGDC. " "Schema validation and conversion uses https://gitlab.com/ags-data-format-wg/ags-python-library"), diff --git a/app/static/js/Leaflet.FeatureGroup.OGCAPI.js b/app/static/js/Leaflet.FeatureGroup.OGCAPI.js index c9fc769..c1e0a1a 100644 --- a/app/static/js/Leaflet.FeatureGroup.OGCAPI.js +++ b/app/static/js/Leaflet.FeatureGroup.OGCAPI.js @@ -141,7 +141,7 @@ L.FeatureGroup.OGCAPI = L.GeoJSON.extend({ * Fired whenever the collection metadata has been loaded. */ this.fire("ready"); - // this._onReady(); + this._onReady(); }); }, diff --git a/app/static/js/map.js b/app/static/js/map.js index 99d3106..0d30a8d 100644 --- a/app/static/js/map.js +++ b/app/static/js/map.js @@ -1,7 +1,9 @@ -var control = {}; -var overlays = {}; -var baseMaps = {}; + +// var control = {}; +// var overlays = {}; +// var baseMaps = {}; + var mapCentre = [54.5, -1.5]; var initZoom = 5.5; @@ -11,7 +13,9 @@ var initZoom = 5.5; var map = L.map('mapid', { center: mapCentre, // centre at specified coords - zoom: initZoom + zoom: initZoom, + minZoom: 5, + maxZoom: 18 } ); @@ -43,7 +47,7 @@ geologyOfbtn = L.tileLayer.betterWms('http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_a /** Add Esri basemap layers to map - this is using the esri-leaflet.js extension * for Leaflet and makes it easier to include Esri functionality in to Leaflet maps: https://esri.github.io/esri-leaflet */ var topo = L.esri.basemapLayer("Topographic").addTo(map); -var imagery = L.esri.basemapLayer("Imagery"); +// var imagery = L.esri.basemapLayer("Imagery"); /** Use the L.tileLayer.betterWms extension to load the AGS wms layer */ var agsindex = L.tileLayer.wms('https://map.bgs.ac.uk/arcgis/services/AGS/AGS_Export/MapServer/WMSServer?', { @@ -68,7 +72,7 @@ var agsboreholes = L.featureGroup "Project Contractor: " + properties.proj_cont + "
" + "Original LOCA ID: " + properties.loca_id + "
" + "AGS Graphical Log: " + "View / " +"Download" + "
" + - "AGS Data: " + "Download" + "
" + + // "AGS Data: " + "Download" + "
" + "AGS Submission Record (raw data): " + "View" + "
"; layer.bindPopup(popupContent); }, @@ -76,7 +80,8 @@ var agsboreholes = L.featureGroup agsboreholes.once("ready", function (ev) { map.fitBounds(agsboreholes.getBounds()); -}); +}).addTo(map); + // (async () => { @@ -107,44 +112,44 @@ agsboreholes.once("ready", function (ev) { // layer.bindPopup(popupContent); // } -baseMaps["Topographic"] = topo; -baseMaps["Imagery"] = imagery; -overlays["Geology"] = geologyOfbtn; -overlays["AGS Index"] = agsindex; -overlays["AGS Details"] = agsboreholes; - -control = L.control.layers(baseMaps, overlays, { collapsed: false }).addTo(map); - -// jQuery UI slider for controling the opacity of the wms layer. -$opacitySlider = $("#opacitySlider").slider({ - slide: function (event, ui) { - geologyOfbtn.setOpacity((ui.value / 100).toFixed(1)); - }, - min: 0, - max: 100, - step: 10, - value: 50 -}); - -// diable dragging when entering div -$("#dOpacitySliderBox").on('mouseover', function () { - map.dragging.disable(); -}); - -// Re-enable dragging when leaving div -$("#dOpacitySliderBox").on('mouseout', function () { - map.dragging.enable(); -}); - -$("#dOpacitySliderBox").click(false); - - -/** Geocoder search functionality - this is using Esri's location search functionality: - * https://esri.github.io/esri-leaflet/examples/geocoding-control.html */ -var searchControl = L.esri.Geocoding.geosearch().addTo(map); -var results = L.layerGroup().addTo(map); - -searchControl.on('results', function (data) { - results.clearLayers(); - // do something with the search results -}); +// baseMaps["Topographic"] = topo; +// baseMaps["Imagery"] = imagery; +// overlays["Geology"] = geologyOfbtn; +// overlays["AGS Index"] = agsindex; +// overlays["AGS Details"] = agsboreholes; + +// control = L.control.layers(baseMaps, overlays, { collapsed: false }).addTo(map); + +// // jQuery UI slider for controling the opacity of the wms layer. +// $opacitySlider = $("#opacitySlider").slider({ +// slide: function (event, ui) { +// geologyOfbtn.setOpacity((ui.value / 100).toFixed(1)); +// }, +// min: 0, +// max: 100, +// step: 10, +// value: 50 +// }); + +// // diable dragging when entering div +// $("#dOpacitySliderBox").on('mouseover', function () { +// map.dragging.disable(); +// }); + +// // Re-enable dragging when leaving div +// $("#dOpacitySliderBox").on('mouseout', function () { +// map.dragging.enable(); +// }); + +// $("#dOpacitySliderBox").click(false); + + +// /** Geocoder search functionality - this is using Esri's location search functionality: +// * https://esri.github.io/esri-leaflet/examples/geocoding-control.html */ +// var searchControl = L.esri.Geocoding.geosearch().addTo(map); +// var results = L.layerGroup().addTo(map); + +// searchControl.on('results', function (data) { +// results.clearLayers(); +// // do something with the search results +// }); diff --git a/app/templates/_base.html b/app/templates/_base.html index 1feb659..1314e89 100644 --- a/app/templates/_base.html +++ b/app/templates/_base.html @@ -427,7 +427,7 @@

- Powered by pyagsapi 4.5.2. pyagsapi was created by and is maintained by the British Geological Survey and is distributed under the LGPL v3.0 licence, code is available on GitHub. pyagsapi uses the Official AGS Python Library. + Powered by pyagsapi 4.5.3. pyagsapi was created by and is maintained by the British Geological Survey and is distributed under the LGPL v3.0 licence, code is available on GitHub. pyagsapi uses the Official AGS Python Library.