Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSWeb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSWeb
Commits
46b380ff
Commit
46b380ff
authored
1 year ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Handle undefined WMS abstract
parent
a3385749
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spatial/static/spatial/js/gridmap.js
+5
-9
5 additions, 9 deletions
spatial/static/spatial/js/gridmap.js
with
5 additions
and
9 deletions
spatial/static/spatial/js/gridmap.js
+
5
−
9
View file @
46b380ff
...
...
@@ -114,19 +114,15 @@ async function initGridMap(inputModelId, mapAttribution) {
let
response
=
await
fetch
(
mapserverURL
+
modelId
+
"
?service=WMS&version=1.3.0&request=GetCapabilities&language=
"
+
settings
.
currentLanguage
);
//console.info(response.status); // Response is 200 even if a model doesn't exist on the mapserver
let
txt
=
await
response
.
text
();
/*
<HTML>
<HEAD><TITLE>MapServer Message</TITLE></HEAD>
<!-- MapServer version 7.6.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
<BODY BGCOLOR="#FFFFFF">
msLoadMap(): Unable to access file. (/disks/data01/mapserver/wms/SEPTREFFUM/SEPTREFFUM.map) <=== Security issue on the mapserver!!!
</BODY></HTML>
*/
//console.info(txt);
let
capabilities
=
parser
.
read
(
txt
);
let
WMSLayers
=
capabilities
.
Capability
.
Layer
.
Layer
;
document
.
getElementById
(
"
modelTitle
"
).
innerHTML
=
capabilities
.
Service
.
Title
;
document
.
getElementById
(
"
modelAbstract
"
).
innerHTML
=
capabilities
.
Service
.
Abstract
.
replaceAll
(
"
\n\n
"
,
"
XXX
"
);
if
(
capabilities
.
Service
.
Abstract
!=
undefined
)
{
document
.
getElementById
(
"
modelAbstract
"
).
innerHTML
=
capabilities
.
Service
.
Abstract
.
replaceAll
(
"
\n\n
"
,
""
);
}
//console.info(capabilities);
// Analyze and organize layers
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment