Initiate a behavior on application launch

1526
5
Jump to solution
05-16-2016 04:30 AM
SvivaManager
Occasional Contributor II

Hello,

I'm trying to realize how can I highlight a polygon or a point on a specific layer (just like the search widget does) as the application loads. I'm getting tangled with how it's best to do this.

My first thought was to inject the code somewhere in the js files after the map was loaded.

After a second thought I came up with the idea of adding a custom behavour inside a custom widget and just execute that widget on load.. So far I couldn't find the best spot where I know for certain the map and all of its content were fully loaded. Anyone ever done such thing before?

Thanks,

Shay.

0 Kudos
1 Solution
5 Replies
SvivaManager
Occasional Contributor II

It seems that the built-in query in parameters works only for feature layers but most if not all of my layers are published as dynamic map services. Any thoughts on that issue? As I see it, I need to develope my own query ability

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sviva,

For a sublayer in a group of map services, use <layer id_sublayer id> as the layer ID.

In the documentation it states querying a sub layer is supported.

SvivaManager
Occasional Contributor II

THANK YOU! It took me quite a while to understand what you mean but I finally did

Apparently my problem was using a map service with a complex name that contains too many special characters.

Those characters flunks the query. Solved by changing the name or using its special id name

SvivaManager
Occasional Contributor II

Ugh! Thank you for pointing that out.. I'll read it

0 Kudos