I was attempting to just do a simple popup for a layer in my webmap. I wanted to point out that it is time aware and the time widget is enabled if that has anything to do with it. I tried a point feature popup for testing and it worked fine and so I tried a line feature and it also worked. The only difference appears to be the fact that it is time aware and the time widget is enabled.
Solved! Go to Solution.
Josh,
So your issue has nothing to do with time or the time widget. It has to do with using a reserved word of "Year" as a field name in your data. When I query layer 0 on your map service using outfields = * the query fails every time (this is actually what the map uses as its outfields when it is querying which feature was clicked to display the popup). But when I specify all the fields bu the "Year" field the query works fine. You need to remove the "Year" field from that layer and create a field that does not use the reserved name of "Year" ("Year_" is fine).
Josh,
So when you say
I tried a point feature popup for testing and it worked fine and so I tried a line feature and it also worked.
do you mean they worked because they were not time aware and you did not have the time widget open?
The time widget was open when I tried this, the other layers are not time aware. Closing the time widget does not make the layer popup either though.
Josh,
So for my testing purposes what is your actual time aware layers geometry that you want to also have a popup on?
Line
Josh,
Is your layer that has the popup defined as a type="feature" or dynamic in your main config.xml?
it is dynamic
<operationallayers>
<layer type="dynamic" label="Streets" imageformat="png8" url="http://70.167.59.150/maps/rest/services/PublicWorks/Streets/MapServer" visible="true">
<sublayer id="0" popupconfig="popups/PopUp_1.xml"/>
<sublayer id="13" popupconfig="popups/PopUp_2.xml"/>
</layer>
</operationallayers>
sublayer 0 is the layer at issue
sublayer 13 the popup worked fine
Josh,
It looks like you have the Shape field hidden for some of those layers in that map service!
I have the Shape filed visible on all of them. I did a quick check to make sure. For some reason some of them have the Shape field down lower though. I'm not sure how that happened, does the order make a difference? The layer in question has it as the second field and is visible
Josh,
So your issue has nothing to do with time or the time widget. It has to do with using a reserved word of "Year" as a field name in your data. When I query layer 0 on your map service using outfields = * the query fails every time (this is actually what the map uses as its outfields when it is querying which feature was clicked to display the popup). But when I specify all the fields bu the "Year" field the query works fine. You need to remove the "Year" field from that layer and create a field that does not use the reserved name of "Year" ("Year_" is fine).