Hoppa till huvudinnehållet

Can I dynamically enable a geocoding endpoint?

Kommentarer

1 kommentar

  • Permanently deleted user
    Hi Berend,

     

    It looks like it is a bit difficult to dynamically enable and disable a geocoder, due to the way the viewer initializes the Search module.

     

    When the Search module initializes, it goes over the list of geocoding endpoints in the Site and includes any that have the includeInGlobalSearch set to true.  Then, the providers are created and passed to the RegisterSearchProvider command.

     

    This will not happen again, and there is no UnregisterSearchProvider command, so you would be able to do your code once but you would not then be able to remove the geocoder.

     

    You may be able to locate the list of SearchProvider objects and set their isEnabled property to True or False but I am not sure how to do that.  It appears to be owned by the SearchManager module.

     

    Regards,

     

    -Malcolm
    0

Du måste logga in om du vill lämna en kommentar.