JPG format as parameter for service request URL in WAB

679
3
07-23-2017 11:53 PM
IonutAlixandroae4
Occasional Contributor

Hi guys,

I have a question regarding changing the format for the request for data (map services) inside an application made with WAB for developers (2.4).

The application contains several layers which were cached layers published as map services. The cache format is JPG but when I check the request format for data, the format request from client is PNG and the data is loading very slowly, even if the service is cached data.

If someone could tell me where exactly to modify or to specify the request format; if I should specify in WAB code or if there`s something about the GIS service that should be changed..

The serivce request looks like this:

https://domain/arcgis/rest/services/Folder/ServiceName/MapServer/export?dpi=96&transparent=true&format=png32&layers=show%3A-1%2C-1%2C-1&bbox=-108530.93828921515%2C225676.9179301192%2C1110671.5001156619%2C816228.0990324814&bboxSR=3844&imageSR=3844&size=1536%2C744&f=image

Also, none of the layers in ArcMap had transparency before publishing..

Thanks,

Ionut

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Ionut,

   This is not possible if your layer you are wanting to change is coming from the webmap. The web map is turned into a Map object using the arcgisUtils.createMap method internal to the JS API which does not allow for that level of control. I find it strange that the request is coming across that way. Normally the request for a tile in a cached map service does not an export request at all, that is only done for a dynamic map service request.

0 Kudos
IonutAlixandroae4
Occasional Contributor

Hi Robert,

Thanks for the reply.

Well, I`m not sure if I made myself clear or similar, but after I manually created the cache data for the published layers, in the .mxd I have replaced the layers with the cache data and published again as a dynamic map service, so the data could load faster in the web map.... So in the end I have a dynamic map service which has some groups and sub-groups of layers (which in the published .mxd are the cached data from another process of publishing). Hope this helps.  

But if the Map object returns the requests as PNG tiles for a dynamic map service, I think it doesn`t matter the workflow anymore..

Thanks,

Ionut

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ionut,

   It sounds like you need to remove the layer from your web map and re-add it now that it has a cache so that it quits thinking it is a dynamic map service and starts treating it as a tiled map service.

0 Kudos