MapTour Not Loading in Player

873
10
Jump to solution
03-22-2022 11:39 AM
JoshBillings
Occasional Contributor II

Hey all,

I am creating a MapTour app with several different Map Tours. All of the MapTours load in the AppStudio Player except for two MapTours. 

It loads the "List" and "Map" screens but it seems like it isn't able to access the MapTour layer.

Any ideas on what I can do to fix this?

 

Thanks!

 

JoshuaBillings_1-1647974207694.png

 

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
rob_hewy
Occasional Contributor

There might be a work around. Open the app in qtCreator. Find the file called TourPageHelper.qml. In the function called createGraphics(), near or at line 109 (my line numbers are off due to adding console.log() statements) change an the if-statement to be:

            if (!(feature.geometry && feature.geometry.x && feature.geometry.y) || !feature.attributes.pic_url) {
                continue
            }

 

The features with objectids in (4, 67) have empty URLS for:

  • pic_url
  • thumb_url

Not sure if the link below will work, but try it out.

https://services.arcgis.com/XAnuVx6VEMybNvyd/ArcGIS/rest/services/Parks_App/FeatureServer/0/query?wh...

 

rob_hewy_0-1648131368003.png

 

View solution in original post

10 Replies
rob_hewy
Occasional Contributor

Did you use the older map tour (pre EXB) or the new ones based on the same/similar tech as EXB/Calcite/reacstrap?

 

0 Kudos
JoshBillings
Occasional Contributor II

I used the classic Story Maps Map Tour. 

0 Kudos
rob_hewy
Occasional Contributor

Could be permissions/sharing settings on the map and the point feature layer.

Try quickly flipping the app+map+layer to public if possible then retest.

If you can share the URL of the tour I can try some testing, understandable if you cannot.

 

0 Kudos
JoshBillings
Occasional Contributor II

Here is a link to the tour: https://cows.maps.arcgis.com/apps/MapTour/index.html?appid=a0e32e5859234c35862c5d3ee2bcecd2

The Tour, Map, and Layer are all public.

0 Kudos
rob_hewy
Occasional Contributor

There might be a work around. Open the app in qtCreator. Find the file called TourPageHelper.qml. In the function called createGraphics(), near or at line 109 (my line numbers are off due to adding console.log() statements) change an the if-statement to be:

            if (!(feature.geometry && feature.geometry.x && feature.geometry.y) || !feature.attributes.pic_url) {
                continue
            }

 

The features with objectids in (4, 67) have empty URLS for:

  • pic_url
  • thumb_url

Not sure if the link below will work, but try it out.

https://services.arcgis.com/XAnuVx6VEMybNvyd/ArcGIS/rest/services/Parks_App/FeatureServer/0/query?wh...

 

rob_hewy_0-1648131368003.png

 

rob_hewy
Occasional Contributor

BTW the images seem to be there. You might be able to update the column values for those features

https://services.arcgis.com/XAnuVx6VEMybNvyd/ArcGIS/rest/services/Parks_App/FeatureServer/0/4/attach...

 

JoshBillings
Occasional Contributor II

This worked! What exactly did the code addition do?

I am in the process of getting all of those pictures updated so I will make sure the URL's are updated.

Thank you so much!

0 Kudos
rob_hewy
Occasional Contributor

Your are welcome.

The existing code blocks features with null geometry or a null x or a null y value from being added to the features list/array. This list is used to created graphics on the map and maybe feed the listModel for the list.

I just added a 'blocker' for null/empty URLS for the attachments. The template already has some code for  tracking features with no URLS: featuresWithEmptyUrls   

Basically, I pretend the parks do not exist. I know the list/list-item uses the thumb_url attachment URL and the name of the park.  

Some where they call checkForAttachments trying to resolve the empty URLS. I even think they find them. However, it might be too late (I am speculating) the list may have tried to render, hit the null value and 'crashed' before an update could sent from checkForAttachments.

Maybe a default thumbnail in TourItemView.qml might help but there seems to be code for that:

getThumbnail() near or at 254.

 

 

 

 

 

rob_hewy
Occasional Contributor

I could not let this one go for some reason. Not a crash at all! Logic issue (maybe).

Line 128 of TourPageHelper.qml (line 4 in the code snippet below)

 

        //populate the empty pic urls
        if(featuresWithEmptyUrls.length > 0)
            checkForAttachments(featuresWithEmptyUrls)
        //else
        addGraphics(features)

 

 

The else has to go. Since you had features with empty/null URLS addGraphics() was never being called.

No features for the map and no features for the list