Select to view content in your preferred language

main stage popup won't open after updating the layer

3735
13
07-13-2015 02:23 PM
JackLloyd
Deactivated User

I've added main stage actions (location and popup) to point and polygon features in my map journal. If I update the feature layer from a ZIP file, the popups won't automatically open anymore. The location still works i.e. zooms to the saved location but the popup doesn't open. Am I doing something wrong?

0 Kudos
13 Replies
GregoryL_Azou
Deactivated User

Sorry about that, some reference that Map Journal is using to restore the popup must be lost when you update your data.  Can you share a link to your Journal?

One thing to consider is that restore popup state, Map Journal will store an id or another unique attribute from your data for the popup you want to open.  If those values change, the popup won't be able to open after data change. You may need to add a new immutable column to your data if you change the order of records.

0 Kudos
JackLloyd
Deactivated User

Thanks for getting back to me on this. Below is a link to one of the Map Journals I’ve been working on. I haven’t updated the layers on this map for a while so I don’t know if the popups on this one will fail. The map with the failing popup is pretty identical but has more content and features. If you want, I can get you added to a group that has access to the failing map.

https://pimamaps.maps.arcgis.com/apps/MapJournal/index.html?appid=1152caf3211d47fcaaedc8effb99dd5e

I’m a little confused on the immutable column. Would this just be a column with a random value that never changes? How does the popup know to use this column?

Thanks!

Jack Lloyd

Manager – Shared Content Platforms

Pima County Information Technology Department

201 N. Stone Ave, 9th Floor

Tucson, AZ 85701

Phone: 520-724-6689

0 Kudos
GregoryL_Azou
Deactivated User

You are welcome, I have tried about 10 main stage actions that open popup and they all seems to work.

In your case, the application is using the value of the column FID to open the popup.

I am not an expert in Desktop tool but if it is an attribute in your data, you just need to make sure that value doesn't change. Otherwise, ArcGIS must be generating it for you, that means that you just can't add/remove or change the record order safely. I know in Desktop you can define what's the attribute to be used as index on your layer, that's that attribute that will be used in the application. Another way may be to have a column named OBJECTID.

Hope this helps

0 Kudos
JackLloyd
Deactivated User

Pretty sure the FID is being generated by ArcGIS desktop. I'll look a little closer at the indexing and might also add a field named OBJECTID to see if that helps. by the way, how were you able to tell the application is using FID for the popups? I looked at the page source and searched for FID and didn't get a hit. Thanks again for your suggestions on how to resolve this problem.

Jack

0 Kudos
GregoryL_Azou
Deactivated User

You are welcome. Good luck. If you open the network tab on a web page inspector and look at the first request that contains data, you will get the Map Journal data as a json...

0 Kudos
JackLloyd
Deactivated User

Perfect! Thanks a lot for all of your help.

Jack

0 Kudos
JackLloyd
Deactivated User

After looking into this and playing with it somewhat, I don’t think I explained the issue well enough. It’s
not that the popups don’t open when you select one of the features (they do), it’s that they don’t open “automatically” when zooming to them. In the left column of my application, I have a “Location” link that will zoom to the
feature and should also open the popup automatically. After the layer is updated, this action of opening the popup automatically goes away. Does this make sense?

0 Kudos
GregoryL_Azou
Deactivated User

That's what I understood all along, sorry if I did not explained well

Your solution should be for you to make sure the FID of your feature don't change with data update or to add a new attribute that won't change and find the way to tell ArcGIS to use that attribute as primary index.

0 Kudos
JackLloyd
Deactivated User

Apparently, there is no way to setup a primary key in ArcMap. You can setup indexes for faster searching, but you can't designate a primary key other than FID. Unfortunately, the FID for this layer gets regenerated nightly as part of our maintenance process. It would be nice if there was a way in the configuration of the popup in the Map Journal or even the online map itself where you could specify a field to use as the primary key (separate than the FID). I think I'm out of luck...

0 Kudos