Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Add support for service proxies #110

Closed kellyhutchins closed 7 years ago

kellyhutchins commented 7 years ago

In the 3.x boilerplate we use arcgisUtils.createMap's layerMixins option to replace layer urls for premium and subscriber content with proxied urls if users choose to enable that option. We need to support this in the 4.x boilerplate. In 4.x there isn't an option to mixin the layers so we'll need to add logic to the app to handle this.

driskull commented 7 years ago

@kellyhutchins I don't think the appProxies property is on the PortalItem in 4x either. At least it's not documented.

I can probably mix them into the WebMap/WebScene items if the appProxies were available on the application item.

kellyhutchins commented 7 years ago

@driskull I spoke to Dasa and it isn't there so we'll just need to get the proxies (if specified) the same way we do in the 3.x boilerplate and then do the layer mixin ourselves.

If you are working on the boilerplate and have time it would be great to add this. If not I can do it.

driskull commented 7 years ago

@kellyhutchins I don't think appProxies is on the item though. How would we get it?

kellyhutchins commented 7 years ago

It should be on the application item is it not? If not let me know and I'll setup a test and talk to Dasa.

driskull commented 7 years ago

I don't see it.

kellyhutchins commented 7 years ago

Ok I'll look into it and see what I can find out.

driskull commented 7 years ago

@kellyhutchins can you implement this here: https://github.com/Esri/application-boilerplate-js/blob/4masterts/src/boilerplate/Boilerplate.ts#L284 ?

I think we should be able to look at the appProxies and then modify any of the layer URLs that are contained in the webmap/webscene items. In theory. right?

kellyhutchins commented 7 years ago

@driskull sure I'll take a look