ArcGISDynamicMapServiceLayer refresh manually does not work

4617
11
Jump to solution
05-11-2015 11:02 PM
takashiiwata
New Contributor II

i am making ArcGISDynamicMapServiceLayer to show sth and i want to refresh the data manually.

i mean i don't want to refresh automatically when the map resizing or moving.

i tried layer option like below but they don't work.

     useMapTime: false

     refreshInterval: 0

if anyone have idea, plz help.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Takashi,

   A FeatureLayer downloads the actual geometry from the server and depending on the mode (i.e. shotshot) it downloads all the data initially. The ArcGISDynamicMapServiceLayer just requests a new image from the server every time something changes like the extent or visible layers, etc. What you are wanting is not possible using ArcGISDynamicMapServiceLayer.

View solution in original post

11 Replies
RobertScheitlin__GISP
MVP Emeritus

Takashi,

   The ArcGISDynamicMapServiceLayer in the JS API will always refresh (request  an new image from the server) when ever you pan or zoom the map there is no property you can set to change this default behavior.

takashiiwata
New Contributor II

Robert,

Thanks very much for your answer.

I got it but I still want to show ArcGISDynamicMapServiceLayer in a state when the Layer was visible.

It is like select all in FeatureLayer.selectFeature.

if you have idea, let me know please.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Takashi,

   Sorry I don't understand what you are wanting to do.

It is like select all in FeatureLayer.selectFeature.

A ArcGISDynamicMapServiceLayer will show all visible layers unless you set a definition Expression for one or more of the layers or set the visibleLayers.

0 Kudos
takashiiwata
New Contributor II

Robert,

I'm sorry I needed more explanation

I want to say the shown data by using "FeatureLayer.selectFeature" will never update even delete data from table.

is that right?

I want to do like that on ArcGISDynamicMapServiceLayer without any selection.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Takashi,

   A FeatureLayer downloads the actual geometry from the server and depending on the mode (i.e. shotshot) it downloads all the data initially. The ArcGISDynamicMapServiceLayer just requests a new image from the server every time something changes like the extent or visible layers, etc. What you are wanting is not possible using ArcGISDynamicMapServiceLayer.

takashiiwata
New Contributor II

Robert,

Thank you so much.

I need to think again the way to show the data to FeatureLayer with LabelLayer.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Takashi,

   Can you explain more about why you don't want the layer to refresh?

0 Kudos
takashiiwata
New Contributor II

Robert,

it is because I have a search button for searching featurelayer data and showing the dynamicmapservicelayer.

why i chose dynamicmapservicelayer is for performance and lavel.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Takashi,

   OK then it sounds like you want to set the dynamicmapservicelayers

LayerDefinitions property using the same sql that you used to search then.

0 Kudos