I am new to working with ArcGIS API for JS, but have done some work with the ESRI leaflet library. I would like to create a map with this API that would visualize an dynamically aggregated time series of historical health in Mexico that is published on my portal (https://elcamaleon.binghamton.edu/server/rest/services/muni_event_aggregation/MapServer)
The data is published as a map image layer.
Basically, I'd like to produce a simple map as per this timeslider tutorial.
Can anyone point me in the direction of any examples that use a timeslider to visualize a dynamically-aggregated mapimage layer?
I am sorry to be so vague.
Solved! Go to Solution.
Here's that same tutorial but slightly modified to your MapImageLayer service:
https://codepen.io/john-grayson/pen/VwxbgBR
Please note that you can't use the individual FeatureLayer directly as some of the TimeInfo properties have not been configured.
Here's that same tutorial but slightly modified to your MapImageLayer service:
https://codepen.io/john-grayson/pen/VwxbgBR
Please note that you can't use the individual FeatureLayer directly as some of the TimeInfo properties have not been configured.
Gosh, that looks so easy, but it's not, at least for me. I see that you used the load() method. I'll have to figure that out, but thank you! I may be back with other related questions, specifically about A) how to change symbology classes in a dynamic layer and b) how to show pop-ups that honor the dynamic row_count. But I should play with that first and come back later when, most likely, I fail. Many thanks!
Please make sure to submit unrelated issues as new questions so we don't confuse things later on.
Hi @BradSkopyk
I'm glad @JohnGrayson was able to help you out (Thanks John). I'm not a JS API developer.
As you see below in the screenshot that in the Map Viewer (both enterprise and arcgis online), you can change symbology as well as enable popup for map image layer.
here are a few samples that I found from JS API help and I thought you might find them helpful:
1. how to change symbols for a sub layer off a map image layer: https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-renderers/
2. for popup, please start from this sample and they have a bunch of samples in there. https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/. Since popup works against sublayers off a map image layer (which is a bit different than feature layer), you need to define the template for the sublayer.
I was not able to find any existing sample showing how popup can be configured for a sub layer off a map image layer, but I was able to put together something very quickly thanks to all available help/sample code the ArcGIS JS API team put together and made available to everyone. https://codepen.io/thoquews/pen/JjvyOVq
Also, you might want to check this help out as well: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html
Hope you will find this helpful
Best regards
Tanu
Thank you @TanuHoque . This was very helpful. Unfortunately, the workflow that you suggested for the popups does not produce dynamic values that respond dynamically to the timeslider extent. I am still having difficulty with pop-ups, but have started a new thread. If you have further suggests, please respond at the new thread.