Select to view content in your preferred language

Adding mapproxy layer to Portal as an Item

763
3
07-23-2023 10:25 PM
AdamGoodfellow_DPFEM
New Contributor

Hi, I have an internal MapProxy server with some layers that I would like to add to Portal (10.9.1) as an item so I can add them to maps and other applications.

So far I have been unsuccessful, has anyone been able to achieve this?

Thanks, Adam.

0 Kudos
3 Replies
Brian_Wilson
Regular Contributor II

I use "New Item" to add each MapProxy service in Portal and use the WMS URL of the services. Once that is done I can use "preview in a map viewer" or I can add the service to web maps.

This is an example. It's a public service so you should be able to see it.

https://delta.co.clatsop.or.us/portal/home/item.html?id=52d0f5c8df9f424db79e3a739dfb9a2b

Here is the "New Item" dialog (for a different service), you need the URL and to pick the type WMS.

Brian_Wilson_0-1690214614399.png

 

I was surprised to see there's no way to see metadata or preview services in ArcGIS Pro. I bet there is already an "idea" filed for that. You can see a little bit by hovering in the  table of contents including the URL. Better than nothing.

Once you have the service republished via Portal you can see them in ArcGIS Pro or add them to web maps.

Here it is in the Pro catalog

Brian_Wilson_1-1690215101681.png

 

Here it is in the table of contents

Brian_Wilson_2-1690215134371.png

Currently I publish one service in a MapProxy instance and run a separate Docker container for each. I used to run a "multiservice" but I find separate containers works better. Each one is monitored by a healthcheck and Docker Swarm will restart any failed service.

Continuing with the same example,  MapProxy instance is here

https://giscache.clatsopcounty.gov/county-aerials-brief/demo/

The URL for the WMS service is the same, replacing "demo" with WMS. I find it useful to test it with a Get Capabilities request, which would be like this

https://giscache.clatsopcounty.gov/county-aerials-brief/wms?SERVICE=WMS&REQUEST=GETCAPABILITIES

I started using MapProxy when some remote services (including the one used in this example) were offline and it tied up my web app. Then I found out I could turn a PDF into a tiled raster package in ArcPro and serve that. I also found I could integrate aerials stored in TIFFs (Cities of Warrenton and Gearhart) and served locally with online services (City of Astoria). The end user just sees a single "cities" service. See service here: https://delta.co.clatsop.or.us/portal/home/item.html?id=14a4c66a8f2045859362f33dc86b819e

I do have to create each service separately in MapProxy and then add an item for it to Portal, but these things don't change often so it's really not much work.

 

0 Kudos
AdamGoodfellow_DPFEM
New Contributor

Thanks for the help. I just tried adding the same layer to AGOL and it worked with the following URL https://<mapproxyserver>/mapproxy/wmts/1.0.0/WMTSCapabilities.xml  yet when I try this with Portal I'm getting an error.

AdamGoodfellow_DPFEM_0-1690235936609.png

Looking in the console there is a GET request that is failing:
dojo.js:145 GET https://<Portalserver>/portal/sharing/proxy?https://<mapproxyserver>/mapproxy/wmts/1.0.0/WMTSCapabilities.xml?request=GetCapabilities&service=WMTS&version=1.0.0 400 (Bad Request)


Is there a way for this request to bypass the proxy at all?

Thanks

0 Kudos
A_Wyn_Jones
Esri Contributor

@AdamGoodfellow_DPFEM The proxy is used when adding a new item via URL. The Portal performs a checkUrl against that service too. The service account running Portal for ArcGIS will need access to the URL in question (you can check via the checkUrl function in portal/sharing/rest).

Also worth checking if you've applied some security settings to a restricted list of allowedProxyHosts:

https://enterprise.arcgis.com/en/portal/latest/administer/windows/restricting-the-portal-s-proxy-cap...

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
0 Kudos