Loading app/package.json +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ "build": "webpack --config webpack.prod.js", "lint": "eslint --ext .js src", "test": "mocha --require @babel/register", "fix": "npm run lint -- --fix", "fix": "npm run lint --fix", "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}", "generate-docs": "node_modules/.bin/jsdoc src/js/ --configure .jsdoc.json --verbose" }, Loading app/src/js/AstroDrawControl.js +4 −3 Original line number Diff line number Diff line import L from "leaflet"; import "leaflet-draw"; import Wkt from "wicket"; Loading Loading @@ -26,7 +27,7 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ options: { position: "topleft", draw: { circle: false, marker: false, circlemarker: false }, edit: false edit: false, }, /** Loading Loading @@ -119,11 +120,11 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ let geojsonFeature = { type: "Feature", geometry: geoJson geometry: geoJson, }; this.myLayer.addData(geojsonFeature); } }, // reprojectFeature: function(e) { Loading app/src/js/AstroMap.js +7 −6 Original line number Diff line number Diff line import AstroProj from "./AstroProj"; import LayerCollection from "./LayerCollection"; import L from "leaflet"; import { MY_JSON_MAPS } from "./layers"; /** Loading Loading @@ -29,7 +30,7 @@ export default L.Map.AstroMap = L.Map.extend({ zoom: 1, maxZoom: 8, attributionControl: false, fullscreenControl: true fullscreenControl: true, }, initialize: function(mapDiv, target, options) { Loading @@ -38,7 +39,7 @@ export default L.Map.AstroMap = L.Map.extend({ this._astroProj = new AstroProj(); this._radii = { a: "", c: "" c: "", }; // Set by layer collection or baselayerchange event Loading @@ -54,7 +55,7 @@ export default L.Map.AstroMap = L.Map.extend({ // Could not work with _ this.layers = { cylindrical: new LayerCollection("cylindrical", cylLayerInfo) cylindrical: new LayerCollection("cylindrical", cylLayerInfo), }; let northLayerInfo = this.parseJSON("north-polar stereographic"); Loading Loading @@ -115,7 +116,7 @@ export default L.Map.AstroMap = L.Map.extend({ let layers = { base: [], overlays: [], wfs: [] wfs: [], }; let targets = MY_JSON_MAPS["targets"]; Loading Loading @@ -178,7 +179,7 @@ export default L.Map.AstroMap = L.Map.extend({ } else { let proj = this._astroProj.getStringAndCode(name, this._radii); newCRS = new L.Proj.CRS(proj["code"], proj["string"], { resolutions: [8192, 4096, 2048, 1024, 512, 256, 128] resolutions: [8192, 4096, 2048, 1024, 512, 256, 128], }); this._currentProj = proj["code"]; this.setMaxZoom(6); Loading Loading @@ -263,5 +264,5 @@ export default L.Map.AstroMap = L.Map.extend({ */ radii: function() { return this._radii; } }, }); app/src/js/LayerCollection.js +7 −5 Original line number Diff line number Diff line import L from "leaflet"; /** * @class LayerCollection * @aka L.Class.LayerCollection Loading Loading @@ -43,7 +45,7 @@ export default L.LayerCollection = L.Class.extend({ let baseLayer = L.tileLayer.wms( String(layer["url"]) + "?map=" + String(layer["map"]), { layers: String(layer["layer"]) layers: String(layer["layer"]), } ); let name = String(layer["displayname"]); Loading @@ -64,7 +66,7 @@ export default L.LayerCollection = L.Class.extend({ { layers: String(layer["layer"]), transparent: true, format: "image/png" format: "image/png", } ); let name = String(layer["displayname"]); Loading Loading @@ -176,7 +178,7 @@ export default L.LayerCollection = L.Class.extend({ version: "1.1.0", request: "GetFeature", outputFormat: "application/json", srsName: "EPSG:4326" srsName: "EPSG:4326", }; let parameters = L.Util.extend(defaultParameters); Loading @@ -192,7 +194,7 @@ export default L.LayerCollection = L.Class.extend({ data["features"] = sortedFeatures; thisContext._wfsLayer.clearLayers(); thisContext._wfsLayer.addData(data); } }, }); }, Loading @@ -214,5 +216,5 @@ export default L.LayerCollection = L.Class.extend({ return 0; } }); } }, }); app/src/js/MousePositionControl.js +5 −3 Original line number Diff line number Diff line import L from "leaflet"; import AstroMath from "./AstroMath"; /** * @class MousePositionControl * @aka L.Control.MousePositionControl Loading @@ -18,7 +20,7 @@ export default L.Control.MousePositionControl = L.Control.extend({ separator: ", ", numDigits: 5, prefix: "", lngFirst: true lngFirst: true, }, /** Loading Loading @@ -152,7 +154,7 @@ export default L.Control.MousePositionControl = L.Control.extend({ onMouseOut(e) { this.lonDisplayElement.innerHTML = "---.---"; this.latDisplayElement.innerHTML = "---.---"; } }, }); /** Loading @@ -161,7 +163,7 @@ export default L.Control.MousePositionControl = L.Control.extend({ * @description Turns position control false. */ L.Map.mergeOptions({ positionControl: false positionControl: false, }); /** Loading Loading
app/package.json +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ "build": "webpack --config webpack.prod.js", "lint": "eslint --ext .js src", "test": "mocha --require @babel/register", "fix": "npm run lint -- --fix", "fix": "npm run lint --fix", "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}", "generate-docs": "node_modules/.bin/jsdoc src/js/ --configure .jsdoc.json --verbose" }, Loading
app/src/js/AstroDrawControl.js +4 −3 Original line number Diff line number Diff line import L from "leaflet"; import "leaflet-draw"; import Wkt from "wicket"; Loading Loading @@ -26,7 +27,7 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ options: { position: "topleft", draw: { circle: false, marker: false, circlemarker: false }, edit: false edit: false, }, /** Loading Loading @@ -119,11 +120,11 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ let geojsonFeature = { type: "Feature", geometry: geoJson geometry: geoJson, }; this.myLayer.addData(geojsonFeature); } }, // reprojectFeature: function(e) { Loading
app/src/js/AstroMap.js +7 −6 Original line number Diff line number Diff line import AstroProj from "./AstroProj"; import LayerCollection from "./LayerCollection"; import L from "leaflet"; import { MY_JSON_MAPS } from "./layers"; /** Loading Loading @@ -29,7 +30,7 @@ export default L.Map.AstroMap = L.Map.extend({ zoom: 1, maxZoom: 8, attributionControl: false, fullscreenControl: true fullscreenControl: true, }, initialize: function(mapDiv, target, options) { Loading @@ -38,7 +39,7 @@ export default L.Map.AstroMap = L.Map.extend({ this._astroProj = new AstroProj(); this._radii = { a: "", c: "" c: "", }; // Set by layer collection or baselayerchange event Loading @@ -54,7 +55,7 @@ export default L.Map.AstroMap = L.Map.extend({ // Could not work with _ this.layers = { cylindrical: new LayerCollection("cylindrical", cylLayerInfo) cylindrical: new LayerCollection("cylindrical", cylLayerInfo), }; let northLayerInfo = this.parseJSON("north-polar stereographic"); Loading Loading @@ -115,7 +116,7 @@ export default L.Map.AstroMap = L.Map.extend({ let layers = { base: [], overlays: [], wfs: [] wfs: [], }; let targets = MY_JSON_MAPS["targets"]; Loading Loading @@ -178,7 +179,7 @@ export default L.Map.AstroMap = L.Map.extend({ } else { let proj = this._astroProj.getStringAndCode(name, this._radii); newCRS = new L.Proj.CRS(proj["code"], proj["string"], { resolutions: [8192, 4096, 2048, 1024, 512, 256, 128] resolutions: [8192, 4096, 2048, 1024, 512, 256, 128], }); this._currentProj = proj["code"]; this.setMaxZoom(6); Loading Loading @@ -263,5 +264,5 @@ export default L.Map.AstroMap = L.Map.extend({ */ radii: function() { return this._radii; } }, });
app/src/js/LayerCollection.js +7 −5 Original line number Diff line number Diff line import L from "leaflet"; /** * @class LayerCollection * @aka L.Class.LayerCollection Loading Loading @@ -43,7 +45,7 @@ export default L.LayerCollection = L.Class.extend({ let baseLayer = L.tileLayer.wms( String(layer["url"]) + "?map=" + String(layer["map"]), { layers: String(layer["layer"]) layers: String(layer["layer"]), } ); let name = String(layer["displayname"]); Loading @@ -64,7 +66,7 @@ export default L.LayerCollection = L.Class.extend({ { layers: String(layer["layer"]), transparent: true, format: "image/png" format: "image/png", } ); let name = String(layer["displayname"]); Loading Loading @@ -176,7 +178,7 @@ export default L.LayerCollection = L.Class.extend({ version: "1.1.0", request: "GetFeature", outputFormat: "application/json", srsName: "EPSG:4326" srsName: "EPSG:4326", }; let parameters = L.Util.extend(defaultParameters); Loading @@ -192,7 +194,7 @@ export default L.LayerCollection = L.Class.extend({ data["features"] = sortedFeatures; thisContext._wfsLayer.clearLayers(); thisContext._wfsLayer.addData(data); } }, }); }, Loading @@ -214,5 +216,5 @@ export default L.LayerCollection = L.Class.extend({ return 0; } }); } }, });
app/src/js/MousePositionControl.js +5 −3 Original line number Diff line number Diff line import L from "leaflet"; import AstroMath from "./AstroMath"; /** * @class MousePositionControl * @aka L.Control.MousePositionControl Loading @@ -18,7 +20,7 @@ export default L.Control.MousePositionControl = L.Control.extend({ separator: ", ", numDigits: 5, prefix: "", lngFirst: true lngFirst: true, }, /** Loading Loading @@ -152,7 +154,7 @@ export default L.Control.MousePositionControl = L.Control.extend({ onMouseOut(e) { this.lonDisplayElement.innerHTML = "---.---"; this.latDisplayElement.innerHTML = "---.---"; } }, }); /** Loading @@ -161,7 +163,7 @@ export default L.Control.MousePositionControl = L.Control.extend({ * @description Turns position control false. */ L.Map.mergeOptions({ positionControl: false positionControl: false, }); /** Loading