Displaying WMS Maps in a Web Browser
Although WMS maps display in GraphWorX runtime, they do not display in HTML5 in GENESIS. This may be due to security settings in Internet Information Services (IIS). To confirm, view the browser console to see if there are errors similar to the following:
Refused to load the image 'path to image' because it violates the following Content Security Policy directive: "policy text".
You can resolve this issue by editing the policy directive in IIS to allow WMS maps to display.
To edit the policy directive in IIS and allow WMS maps:
-
In the Windows search box, enter IIS Manager and open Internet Information Services Manager.
- Select your server and expand it.
- Expand Sites > Default Web Site, and select AnyGlass.
- Double-click HTTP Response Headers.
- Double-click Content-Security-Policy to open the Edit Custom HTTP Response Header dialog.
-
In the Value box, add the domain for your map server to the img-src 'self' list before the word data.
For example, if your map server URL is http://myMap.example.com, you would edit the string as follows:
default-src 'self'; connect-src 'self' wss:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' *.virtualearth.net *.arcgisonline.com *.virtualearth.net *.amap.com *.googleapis.com *.example.com data: