Geolocation?

This topic contains 34 replies, has 7 voices, and was last updated by  Vikas 9 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #660

    justmark
    Full Member
    Post count: 375

    Is geolocation available? I cannot find a way to enable it. A great feature that is essential if somebody is accessing it from their smartphone.

    #661

    Vikas
    Full Member
    Post count: 1128

    HI,

    We are working on it and it will be available shortly.

    Thanks to be patient.

    #665

    justmark
    Full Member
    Post count: 375

    Thanks.

    #691

    directory
    Expired Member
    Post count: 1502

    Awesome!

    #806

    julian
    Free User
    Post count: 37

    Hi justmark, at the moment, i include this plugin, and it works:
    http://git.ladasoukup.cz/wp-google-map-with-routing-wp-plugin

    #807

    julian
    Free User
    Post count: 37

    Hi justmark, at the moment, i include this plugin, and it works:

    http://git.ladasoukup.cz/wp-google-map-with-routing-wp-plugin

    #883

    Vikas
    Full Member
    Post count: 1128

    Hi,

    I will check too.

    #910

    justmark
    Full Member
    Post count: 375

    This is cool but in my opinion geolocation should be a core function and not a plugin but it definitely gets the job done!

    #966

    julian
    Free User
    Post count: 37

    Strongly Agree

    #1037

    directory
    Expired Member
    Post count: 1502

    Hi Julian,

    Thanks for sharing it. Would you mind sharing the steps on how to install and use it?

    Once activating it, what short code do we use and where do we embed it? Is this all we have to do?

    #1048

    julian
    Free User
    Post count: 37

    Hi ManilaBoy, i make some modifications on the code of these plugin, not in geodirectory.
    I make this:
    1 install and activate the plugin.
    2 on “edit place”, i put the code (modify for some adress near you for test) on the end of description area, when finish the description (see the screencaps)
    3 look here the result:
    http://sevilla.andeando.com/?gd_place=buddakan

    On these, i’ve included the next code: [gmap-route addr=”Sant Pere, 12 Vila-seca, Spain” zoom=15 geo=”true” map_type=”ROADMAP” map_width=”600″ info_width=”600″ height=”400″ lang=”es”]

    the perfection is if we can change the map on te “map section” for this, but i’m not very good programmer.

    If you want the plugin modified by me, ask.
    Regards

    #1056

    increxendo
    Expired Member
    Post count: 3

    Hi, the problem with geolocation it’s not compatible with W3 Total Cache that is necessary for my site

    #1060

    directory
    Expired Member
    Post count: 1502

    Thank you, Julian.

    #1650

    Kevin Heath
    Buyer
    Post count: 33

    Hi

    I don’t want to get too involved in offering support or solutions but if you want geolocation on search then you can do the following.

    Add this code to the header – you can do that is geodirectory design options:

    
    
    <?php global $goe_locate; if($goe_locate){echo $goe_locate;} ?>
    <script type="text/javascript">
    function showLocation(position) {
      var latitude = position.coords.latitude;
      var longitude = position.coords.longitude;
      var add = latitude+','+longitude;
      document.getElementById('snear').value = add;
    }
    
    function errorHandler(err) {
      if(err.code == 1) {
        alert("Error: Access is denied!");
      }else if( err.code == 2) {
        alert("Error: Position is unavailable!");
      }
    }
    function getLocation(){
    
       if(navigator.geolocation){
          // timeout at 60000 milliseconds (60 seconds)
          var options = {timeout:60000};
          navigator.geolocation.getCurrentPosition(showLocation, 
                                                   errorHandler,
                                                   options);
       }else{
          alert("Sorry, browser does not support geolocation!");
       }
    }
    </script>

    Then open up geodirectory-tempates > listing-filter-form.php and add at around line 46 just before the search button

    <input type="button" class="geo" onclick="getLocation();" value="Find Me">

    You can do basically the same with directions but the problem with directions is that the plugin currently uses the default location rather than the actual location.

    You can see the geolocation hack at naturesites.co.uk

    Kevin

    #1651

    directory
    Expired Member
    Post count: 1502

    Thank you for sharing it, Kevin.

    Do you know how to automatically detect the user and load listings based on the user’s location instead of having him use the Find Me option?

Viewing 15 posts - 1 through 15 (of 35 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket