is there a Geocoder search complete event?

I am doing a custom postRender process to minimize CPU usage. A repaint notification is sent in user interactions like mousemove and click but if the user searches for something in the geocoder and stops moving the mouse around the app will not update to fly to the location found.

To better explain the issue go here and search for London or something (in the cesium widget, not the one on the left) and DONT move the mouse: http://pic.herokuapp.com/map/

The map stays static. As soon as you move your mouse the map will move. I’d like to know how to capture some sort of “searchComplete” event to produce a repaint notification.

Or maybe there is a better/proper way of doing this?

Hello,

Yes, see the GeocoderViewModel.complete event. This is triggered when the flight is complete.

Best,

Hannah

thanks, but doen’t that fire when the Camera ends moving and not when the Search widget receives a search result? at least this is what i’m seeing (v 1.17)

Oh sorry, I thought that’s what you were looking for.
It doesn’t look like we have an event that gets triggered when the search is complete.
GeocoderViewModel.search is a Command, which has beforeExectute afterExecute events. You might be able to use one of those in conjunction with checking the property GeocoderViewModel.isSearchInProgress. isSearchInProgress gets set to true before the geocoder service call is made, and gets set to false when a result is returned.

It should be really trivial to add an event to handle this case. I’ll see about adding that for the next release.

Best,

Hannah

afterExecute should do exactly what you want.

that worked!

my code is:

this.viewer.geocoder.viewModel.search.afterExecute.addEventListener(function () {this.notifyRepaintRequired()});

``