Select to view content in your preferred language

How to add custom content (secured WMS) to Web AppBuilder app

5066
10
06-29-2016 07:31 AM
MichalGasiorowski
Occasional Contributor

I want to create simple web app in Web AppBuilder Developer Edition 2.0.

The app should combine an ArcGIS Server service and a secured WMS.

My organization uses Portal for ArcGIS 10.3.1 so I'm not able to add a secured WMS as an item in Portal.

I think I can add secured WMS following the way presented in this example:

Custom layer - WMS | ArcGIS API for JavaScript 3.17

Which files generated by the Web AppBuilder should I modify to add custom content which cannot be adde to Portal items?

According to the example above I'll have to use addLayer method among others.

0 Kudos
10 Replies
MichaelRobb
Honored Contributor

"My organization uses Portal for ArcGIS 10.3.1 so I'm not able to add a secured WMS as an item in Portal. 

Why not?  Add layer from Web >> A WMS Web Service is available in 10.3.

Alternately, you could look at the LocalLayer widget.

0 Kudos
MichalGasiorowski
Occasional Contributor

Come on, do you think I didn't try first?

I've also read that secured WMS are supported from Portal 10.4.

I'll try with the LocalLayer widget.

0 Kudos
MichaelRobb
Honored Contributor

my apologies.

10.4

after looking, I dont think LocalLayer will be useful for your situation .

You were on the right track with the JS API

0 Kudos
JunshanLiu
Frequent Contributor

There is an add data widget(arcgis.com), could you have a play and check whether it's what you want?

0 Kudos
MichalGasiorowski
Occasional Contributor

Unfortunately https://  WMS service is 'unsupported' in this widget.

Moreover, added URLs are not saved in the map.

I've also found Add Service Widget - but it also doesn't support secured WMS.

0 Kudos
MichalGasiorowski
Occasional Contributor

So, we've found there's rather no widget which can help.

I was able to display secured WMS using JS API (with standard WMSLayer).

But I still have no idea which files generated by WAB should I modify to insert my code. Any ideas?

0 Kudos
JunshanLiu
Frequent Contributor

In jimu.js/MapManager, at line 269, the map object is created. I think you can add your layers here.

PriyankaKammari
Emerging Contributor

I was looking to similar kind of issue like adding secured wms layer from geoserver to map using Esri Js API.. Can you please provide help with that.  Thanks

0 Kudos
Shauna-RaeBrown
Frequent Contributor

Michal, I've found that I need to make the map in Portal, where you can add a service by using its url.  Then you make the web map app from the Portal map.  I hope that helps.

0 Kudos