Processing custom URL parameters

455
1
04-23-2022 05:32 AM
Labels (1)
MarkJTurnbull
New Contributor III

Hi

I am building a custom widget that will process some custom URL query string parameters and will change the query on a dataview on startup. I have a process in place (somewhat based on the filter-feature-layer sample), however when I try to get the dataview's datasource from the DataSourceManager it does not exist, I assume it has not loaded at the time the URL parameters are being processed. I have tried initiating the processing of the query string parameters in the on the ActiveViewChange event of the JimuMapViewComponent. My widget does not need to load the dataview, so I am avoiding implementing a DataSourceComponent. Can anyone suggest an event I can use to trigger my URL processing, once the datasources have been created? Should I implement the DataSourceComponent and use an event from it to trigger the processing?

Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

@MarkJTurnbull 

This is what I am doing in one of mine.

//this is inside my activeViewChangerHandler
this.state.jimuMapView.whenJimuMapViewLoaded().then(()=>{
          watchUtils.whenFalseOnce(this.state.jimuMapView.view,'updating',()=>{
            //do my work with url parameters here
          })
        })
0 Kudos