Select to view content in your preferred language

Flex Viewer cached map services resolution different than JavaScript Viewer

2626
17
08-09-2012 10:49 AM
MeadeTurner
Emerging Contributor
Can someone please let me know if there should be a consistent display of cached map services between the JavaScript Viewer vs. the Flex Viewer.  I have created a cached map service and the quality degrades substantially when viewing the same map service in the Flex viewer (3.0) vs. the JavaScript viewer.  Any thoughts on this would be much appreciated.

Thanks!
Tags (2)
0 Kudos
17 Replies
MehrshadNourani
Regular Contributor
I have the same exact questions! I would appreciate any thoughts on the issue.
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
MehrshadNourani
Regular Contributor
Are you setting the layer's type to "tiled"?

See:
http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag/01m30000000p000000/


Thank you for your response. When I set the layer's type to "tiled", the layer does not draw! Only when the layer type is set to "dynamic", it draws! Thanks for your help.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Meade and Mehrshad,

   Here is an image of the topo map take using both the Flex API and JS API and they are identical in quality.

[ATTACH=CONFIG]16830[/ATTACH]

Mehrshad, Your likely issue is that all your tiled/cached maps have to be in the same spatial reference and have the same levels of display if you are going to be able to see them together in the map.
0 Kudos
DasaPaddock
Esri Regular Contributor
If you set the layer type to "dynamic", the client will ask the server for a single large map image to be generated for the current extent of the map. If the service on the server has cached tiles, it will stitch the tiles together and resample the image to match the requested scale and spatial reference. This can reduce the output quality vs. loading the tiles directly into the client. You can try setting imageformat="png32" to see if this improves the output quality. Another option, if you're using a 10.1 server, is to enable dynamic layers on the service and then the server will produce the new image from the source data instead. This means that the cached tiles would not be used at all. For the best performance though you'll need to set the layer type to "tiled" and make sure that all the "tiled" layers are cached using the same spatial reference and scales.
0 Kudos
MehrshadNourani
Regular Contributor
Dasa,
I'll follow through with your advice. Thank you very much for your advice!
0 Kudos
MehrshadNourani
Regular Contributor
Robert,
I think I may have missed a few steps in creating the services. Thanks for your advice.
0 Kudos
MehrshadNourani
Regular Contributor
Meade and Mehrshad,

   Here is an image of the topo map take using both the Flex API and JS API and they are identical in quality.

[ATTACH=CONFIG]16830[/ATTACH]

Mehrshad, Your likely issue is that all your tiled/cached maps have to be in the same spatial reference and have the same levels of display if you are going to be able to see them together in the map.


Robert,

I followed your advice and retraced our steps over, and over, and matched our projections/scales and resolution, but still get two distinctly different image quality between the services. I have a snapshot of our Flex Viewer vs. JavaScrip service. We would be grateful if you have any suggestions.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Mehrshad,

   the advice I gave was concerning this comment of yours:
Thank you for your response. When I set the layer's type to "tiled", the  layer does not draw! Only when the layer type is set to "dynamic", it  draws! Thanks for your help.      


So are you able to add the layer a tiled and you still get the resolution difference?
0 Kudos