Variable duration_guess for GeoJSONView

Hi, I want to implement two GeoJSONViews in my app:

  1. A GeoJSONView with a duration guess of max. 3 seconds for quickly drawing a GeoPolyline
  2. A GeoJSONView with a duration guess of >3 seconds in order to activate the “update” button, as the user first needs needs to fill in all fields in the parametrization before something can be shown on the map. Also, the calculations take much longer.

Whether GeoJSONView nr. 1 or nr. 2 is chosen should depend on an OptionField from which the user selects an option. Is it possible to make the duration_guess parameter of the GeoJSONView dependent on a parametrization field value? Or is there a different, more suitable approach for this? Currently I’m forced to make to separate GeoJSONViews to achieve this, but from a user’s perspective this is very confusing.

Hi Martijn.

First of all, thank you for posting and sorry for the late response.
This topic must have slipped our attention in the first week of the year.

Regarding you question:
It is not possible to set the durration_guess parameter dynamically base on user input.

An approach could be to use ‘stages’ or ‘steps’ to make it more clear for the user. So you could start with a stage or step where the quick view is presented and where the Polyline is drawn. Than the user can move on to the next step or stage, where user sees the ‘slow’ view and must set the params first and load the view manually.

Hope this still helps you.

1 Like