Select to view content in your preferred language

MapViewer Template Map Page Questions

2370
15
07-19-2020 04:39 PM
GarrettSmith1
Occasional Contributor

Hello

My previous question had to do with QuickReport template, but I am trying to combine the functionality of the two and am working simultaneously on both to get them to where they are actually ready to be combined.

I plan to use the MapPage from MapViewer as my landing page in the QuickReport template and have almost got it to function in the way that I am intending for the app that I am creating. I have run into two issues.

First, is there a way to remove the measure tool from the header bar? I have placed visible:false under the ControlIcon for the measure tool icon, however it does not disappear. When I remove code for the measure tool within the page I run into two issues; (1) the legend for the feature within the map stops working and/or (2) the MapPage opens on the measure page and no other buttons work.

Second, is there a way to declare what attributes I want to appear in the legend window when a feature is selected? I only want three things to appear. If so, is there also a way to order them?

Thank you.

0 Kudos
15 Replies
by Anonymous User
Not applicable

Hi Garrett,

You can find the zip file in my reply posted on July 22nd.

Thanks,

Tina 

0 Kudos
GarrettSmith1
Occasional Contributor

Got it thanks. I could not see it when I was looking at the thread in my InBox.

0 Kudos
GarrettSmith1
Occasional Contributor

Hello Tina

I am just now circling back to this App development after a much needed break.

I have included the code you provided in my code on both the MapViewerApp.qml and MapPage.qml pages respectfully. When I run the app, I still get all the data fields in the app. See attached photo.

I have hidden all the fields I do not want to see in my feature layers on my ArcGISOnline account. When I look at the basemap that I am using for the app on ArcGISOnline, only the fields that I want are present on the pop-up, when I look at them in the App I have too many fields. The screen shot displays the same feature in the App on the left and on ArcGISOnline on the right. I only want the name, type, and manager fields to pup up in the App, not all the other information that is not useful to users.

As I understand the code it should only be displaying the visible fields from the online map? I am guessing that this comes from the following line:

function isFieldVisisble(fields, fieldName)

Please let me know if I am doing something wrong.

0 Kudos
by Anonymous User
Not applicable

Hi Garrett,

If you didn't make any code changes to the PanelPage.qml page. You will need to replace the PanelPage.qml file as well. 

You can also download AppStudio 4.3 Beta or wait for AppStudio 4.3 final release (in one or two weeks) to get the latest Map Viewer template that supports this feature. (You can upload your app to the organization first if you are concerned about losing changes.)

Thanks,

Tina 

0 Kudos
GarrettSmith1
Occasional Contributor

Hi Tina

Thank you so much, it is now working as I would like and only showing the attribute fields in the feature layer that will be useful for the users.

On another note.

I have been modifying the MapViewer and QuickReport templates and I am now at the point where I want to combine the two. My hope is to take the MapPage from the MapViewer template and apply it as the first screen (page) of the QuickReport template. Do you have any suggestions for a way to efficiently do this? I know that the MapPage references other pages, controls, and images within the MapViewer template and I am not sure how to copy and/or apply these to the QuickReport template. 

Any ideas would be greatly appreciated and thank you again for the help with working out the legend.

0 Kudos
by Anonymous User
Not applicable

Hi Garrett,

If you want to just show a web map in the Quick Report Map page, you can go to Quick Report settings > Forms > Web Map ID.

However, you will need to refer to Map Viewer source code for identifying features and show pop-up information. 

Tina

0 Kudos