Select to view content in your preferred language

Why does my layer not create a pop up?

1381
11
Jump to solution
08-27-2014 09:25 AM
JoshWhite
Honored Contributor

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.

Josh White, AICP
Principal Planner

City of Arkansas City
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

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).

View solution in original post

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

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?

0 Kudos
JoshWhite
Honored Contributor

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 White, AICP
Principal Planner

City of Arkansas City
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Josh,

   So for my testing purposes what is your actual time aware layers geometry that you want to also have a popup on?

0 Kudos
JoshWhite
Honored Contributor

Line

Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Josh,

   Is your layer that has the popup defined as a type="feature" or dynamic in your main config.xml?

0 Kudos
JoshWhite
Honored Contributor

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 White, AICP
Principal Planner

City of Arkansas City
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Josh,

   It looks like you have the Shape field hidden for some of those layers in that map service!

0 Kudos
JoshWhite
Honored Contributor

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 White, AICP
Principal Planner

City of Arkansas City
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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).

0 Kudos