Support » Plugin: Directorist - Business Directory Plugin » Location Services Not Working

  • Resolved coffeestops

    (@coffeestops)


    Hi all!

    We are looking to build a site for users who won’t be logged in to the system. They will simply be visiting the site to find locations near them.

    Having installed the plugin we have the functionality up and running using the Google Maps API. Everything seems to run smoothly as long as there is an active login If you have simply visited the site and are not logged in, the Maps API functionality is limited and I have noted that the following is logged in the developers console:
    Uncaught ReferenceError: google is not defined
    at search-form-listing.js?ver=5.6.1:87
    at search-form-listing.js?ver=5.6.1:135
    (anonymous) @ search-form-listing.js?ver=5.6.1:87
    (anonymous) @ search-form-listing.js?ver=5.6.1:135

    Is there a fix for this so that all functionality is available for visitors to the site?

    I would also like to ask if there is a way to make the site focus on the users location on the window load?

    Many thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • I noticed this too and manually added the Google Maps loading script to all pages but this is a really bad temporary hackfix.
    I believe the shortcodes dont load the maps API scripts.

    Thread Starter coffeestops

    (@coffeestops)

    @technicalx, do you have an example of the type of code you placed?

    Would be great if Directorist could fix this. Lookong to paying a subscription but this is a major issue for us if it doesn’t work.

    Yeah sure, put this in your site header

    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places">
    /* fix directorist bugs not loading main stuff sometimes */
    </script>
    Thread Starter coffeestops

    (@coffeestops)

    @technicalx, thanks so much!

    I hope our good friends put a fix in for this soon!

    Plugin Support Rafiz Sejim

    (@rafizsejim)

    Hello @coffeestops and @technicalx

    We are sorry for the trouble.

    Our developers are looking into it and I will get back to you with an update soon. Thank you for your time and effort in reporting the issue.

    Regards,

    Thread Starter coffeestops

    (@coffeestops)

    @rafizsejim, great news, thanks so much!

    If this get up and running I will be sure to sign up to a yearly subscription, thank you for a great plugin!

    Plugin Support Rafiz Sejim

    (@rafizsejim)

    Marking this as resolved since the issue was resolved via the site support system.
    The issue was transpiring due to enabling “Defer Render-Blocking” in SG Optimizer plugin.

    Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Location Services Not Working’ is closed to new replies.