Select to view content in your preferred language

Display selected layer and its attributes on base map using custom filter widget in Experience Builder

1745
6
Jump to solution
10-12-2023 01:03 AM
SurinderMohan
New Contributor

Hello,

I am developing custom filter widget consuming a map service having different layers and its attributes using Experience Builder application. I am accessing other Experience Builder application having a base map as a web map. I am working on the Developer Edition using "arcgis-experience-builder-1.10" ArcGISExperienceBuilder client and server installed in my local machine at http://localhost:3001/experience/

I need a solution how to communicate between 2 Experience Builder application to achieve the desired functionality say "Display selected layer and its attributes on the map using custom filter widget".

Appreciate your response for the question and looking for an appropriate solution to achieve the "Custom Filter" widget and its functionality in Experience Builder.

Thanks,

Surinder Mohan

GIS Developer

Email: surinder.m@gpceast.com

0 Kudos
3 Solutions

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

You are attempting to send communication between two seperate applications, not two separate widgets? Why? What are you trying to accomplish?

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
Surinder
Emerging Contributor

Hi Jeffrey,

Yes, attempting to send communication between two separate applications one is the base map having layers and attributes and other is custom filter consuming the map services having same layers and attributes. My requirement is as I choose in the drop-down selected layer and desired attributes are selected and on Click submit button, should highlight on the map the selected one and show popup on the map. Looking for the solution and need to achieve the functionality using the Experience Builder and I am working on Developer Edition. 

Thanks,

Surinder Mohan

View solution in original post

0 Kudos
Surinder
Emerging Contributor

Hi Jeffrey,

Here 2 applications, one is a web map consists of a base map having layers and its attributes and other is custom filter widget application. Both of need to communicate with each other to achieve the functionality while filtering the layer with desired attributes and submit it should display the selected one on the base map and both of them using the same map services url. I tried with highlight and popup methods could not succeed. Looking for a solution.

Thanks,

Surinder Mohan

View solution in original post

0 Kudos
6 Replies
JeffreyThompson2
MVP Regular Contributor

You are attempting to send communication between two seperate applications, not two separate widgets? Why? What are you trying to accomplish?

GIS Developer
City of Arlington, Texas
0 Kudos
Surinder
Emerging Contributor

Hi Jeffrey,

Yes, attempting to send communication between two separate applications one is the base map having layers and attributes and other is custom filter consuming the map services having same layers and attributes. My requirement is as I choose in the drop-down selected layer and desired attributes are selected and on Click submit button, should highlight on the map the selected one and show popup on the map. Looking for the solution and need to achieve the functionality using the Experience Builder and I am working on Developer Edition. 

Thanks,

Surinder Mohan

0 Kudos
JeffreyThompson2
MVP Regular Contributor

Within a single application, this could be accomplished fairly easily with the view.openPopup() method and adding handles with layerView.highlight(). The additional application makes this more difficult. Why are they separated out? Is the map intended to be a passive viewer being controlled by a remote user using the filter? To make this work in a two application set-up, you would need to build an API to trigger communication between them.

GIS Developer
City of Arlington, Texas
0 Kudos
Surinder
Emerging Contributor

Hi Jeffrey,

Here 2 applications, one is a web map consists of a base map having layers and its attributes and other is custom filter widget application. Both of need to communicate with each other to achieve the functionality while filtering the layer with desired attributes and submit it should display the selected one on the base map and both of them using the same map services url. I tried with highlight and popup methods could not succeed. Looking for a solution.

Thanks,

Surinder Mohan

0 Kudos
Surinder
Emerging Contributor

Hi Jeffrey,

As suggested, an API for communicating between two applications would typically at backend server and call the API in the front-end. Hopefully it might be a probable solution.

Please comment on it.

Thanks,

Surinder Mohan

0 Kudos
JeffreyThompson2
MVP Regular Contributor

I don't have much experience with API design, but it should be possible to pack your filter requirements into a json object and send them as a put request to an intermediary server that would relay them to the map application.

Again, making your filter and map work together would be much simpler in a single application, and I don't understand why you are using two applications. 

GIS Developer
City of Arlington, Texas
0 Kudos