Select to view content in your preferred language

Time Aware ArcGISImageServiceLayer, SDK 10.2 - No 'time' Argument in Query String

4100
5
02-20-2014 06:22 PM
TimJohns
New Contributor
I tried this on Android earlier this week, and ran into some limitations of the API (see this post), so figured I'd give it a shot with the Java SDK, which DOES have the methods I was looking for exposed.

No luck - it seems like the ArcGIS Runtime SDK for Java is just not adding the time parameter into the query string.  In other words, with the code below, I get (ala Wireshark) the following:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/MODIS/ImageServer/exportImage?f=ima...

but what I WANT (and expect) is a query string like the following (note the 'time' parameter):

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/MODIS/ImageServer/exportImage?f=ima...

Note in the code below I tried various combinations of setCurrentTimeExtent() and setTimeInterval(), in createMap(), but no luck.  I can't seem to coax the SDK into adding the time parameter.

Any suggestions?  Has anyone successfully used the Java SDK (or the Android SDK) to specify the time interval for imagery from an ImageServer?

Relevant snippet here, actual full source code attached:

    private JMap createMap() throws Exception {
        final JMap jMap = new JMap();


        LayerList layers = jMap.getLayers();


        // -----------------------------------------------------------------------------------------
        // Time Aware Layer - MODIS
        // -----------------------------------------------------------------------------------------
        imageServiceLayer = new ArcGISImageServiceLayer(modisImageryPath);
        Calendar startTime = Calendar.getInstance();
        Calendar endTime = Calendar.getInstance();
        startTime.setTimeInMillis(1088665200000l); // Mid 2004
        endTime.setTimeInMillis(1094022000000l); // About a month later
        TimeExtent timeExtent = new TimeExtent(startTime, endTime);
        imageServiceLayer.setCurrentTimeExtent(timeExtent);
        imageServiceLayer.setTimeInterval(timeExtent);
        jMap.setTimeInterval(timeExtent);
        
        layers.add(imageServiceLayer);


        return jMap;
    }
0 Kudos
5 Replies
TimJohns
New Contributor
(I cross-posted on Android thread - working in both environments)

Just checking back in - no luck so far.  I have been able to bang out a couple of REST-based non-SDK pieces of code that show the server's doing what's expected, but no luck on the client side on either Android or pure Java.
0 Kudos
SachinKanaujia
Occasional Contributor III
Haven't seen this work either. Works with REST calls but doesn't work with SDK. Report this as a bug or raise it with ESRI support.
0 Kudos
EliseAcheson1
Occasional Contributor
Hi,

Thanks for your post, from what you're saying this could be a bug, we're going to take a look at this so stay tuned.

~Elise
0 Kudos
EliseAcheson1
Occasional Contributor
Hi again,

At the upcoming release of the Runtime SDK for Java (10.2.2), Image Service layers will support time awareness. Thanks for flagging this up,

~Elise
0 Kudos
CenterlineMapping
New Contributor III

Elise,

Do you know if the ArcGIS Runtime SDK for Android 10.2.8 supports time aware image service layers.  I'm not seeing any methods for Dynamic Map Services, as shown in the SDK documentation pages, such as setTimeExtent()

Is this a bug also?

0 Kudos