Difference in functionality for hosted vs. self-hosted site - "Use Your Current Location"


I set up a test site to try out Ushahidi at https://librarysites.ushahidi.io - when I look at the survey on that site and go to the Location question upon clicking in the location search bar, I get an option that says “Use Your Current Location” (see screenshot).


I don’t have this option when I created the same survey and used the Location question type in my self-hosted deployment. We have not set up the app / dev environment at this time. We installed the site on AWS running the latest version of the Usahidi software on top of a LAMP stack.

I have looked through the browser developer tools and see differences in the config.json file between my self-hosted site and the site hosted by Ushaidi. I am assuming that this option comes from something in the configuration and would like guidance on what we need to do to get this option to show up for our users.

Thanks in advance - Chris


Did you set up TLS encryption as well? It looks like most browsers only offer geolocation to sites running in contexts secured with HTTPS ( ref: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation )


David: Thanks for the quick response - we have not set up TLS encryption.

We just have a single server at this time and not run the steps to configure another dev server for the API access, but that is in the plans.

Is setting up TLS and HTTPS the only things that we need to do to get this feature to appear on our self-hosted deployment?
Or are there additional configuration steps that we need to take?



Yep as far as I understand, that should be all. Picking up the user location is something that happens between the browser and the leaflet javascript mapping library.


Thanks - we’ll work on getting that set-up.


We have implemented https and this did indeed fix the problem - now when we click in the location box an option is there to “Use Current Location”. Very much appreciated as we expect that this will make our data collection efforts much more efficient.


Awesome! Great to hear