No Records showing on map. 3rd try

This topic contains 17 replies, has 3 voices, and was last updated by  Simon 6 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #406014

    Simon
    Full Member
    Post count: 35

    hi there, I have uninstalled, reinstalled, uploaded demo data. They are showing on categories, but not on map. Photo attached.

    IS there a basic setting we are missing??? We have tried many solutions. But nothing is working.

    #406022

    Guust
    Moderator
    Post count: 29970

    Please post your URL and WP admin details in a private reply and we will have a check of your settings.
    Thanks

    #406053

    Simon
    Full Member
    Post count: 35
    This reply has been marked as private.
    #406061

    Guust
    Moderator
    Post count: 29970

    Strange, usually importing the dummy data adds Street addresses and coordinates.
    Somehow that did not happen, I added addresses now to some of the listings, so it works.
    http://www.liveryyards.com/places/attractions/

    I’ll get a developer to investigate why it did not work for you.
    I think you may have discovered a new bug since WP updated to 4.9. I can replicate it on my test site.

    Thanks

    #406070

    Simon
    Full Member
    Post count: 35

    Hi there thanks for that. No worries. Bugs happen. I can roll it back if need be and upgrade it later. I will try it on another domain.

    the attractions still aren’t showing on the home map though. Stills says records not found? Is that part of the bug?
    http://www.liveryyards.com/

    #406073

    Simon
    Full Member
    Post count: 35

    Also if i just delete the dummy data, and add locations manually (or others by add listing) will they show up?

    #406078

    Simon
    Full Member
    Post count: 35
    This reply has been marked as private.
    #406079

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    The problem is not related to 4.9 the issue is that the maps api key you are using is limited to a domain so the server api requests are failing.

    You have two options if you want the dummy data to work correctly:
    1. Use a non restricted api key, you can set a new key from GD>Design>Map>Google Maps API KEY>Generate API key.
    2. Edit the file: geodirectory/geodirectory-functions/location-functions.php
    line 297 change from:

    $url = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' . trim($lat) . ',' . trim($lng) . "&key=" . geodir_get_map_api_key();

    to:

    $url = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' . trim($lat) . ',' . trim($lng);

    We will be making changes in the next version to try and improve this.

    Thanks,

    Stiofan

    #406092

    Simon
    Full Member
    Post count: 35

    Sorry, i don’t understand fully. You want us to open the API key to non-restricted use (exploitable)? Or do you mean we haven’t added the domain correctly into the referrers. We have added all domains/sub-domains etc etc into the referrers and it seems to be working well for other map calls etc. It is only restricted to domains we are using, so that should be OK right? Or is geo-directory calling from somewhere other than our website?

    I can make the changes to functions ok. Will try those now

    #406102

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Let me try and explain it a bit more.
    During the dummy data install we use the Google serverside api, some users were having problems after adding and removing the dummy data over and over as without an API key the daily limit is very very low, so we added the API key but if the api key is limited to the domain then on server side it will not work. I have removed the api key from the call for now as the daily limit without it should be more then enough to install dummy data a few times a day.
    In future we will likely add a second api key input for a server side key which will only be needed in some circumstances.

    Thanks,

    Stiofan

    #406116

    Simon
    Full Member
    Post count: 35

    Got ya, How you create relevant listings for the region selected as you need to create address records on the fly or you would need to have to have static addresses which wouldn’t work for local place.

    Awesome thanks for explaining. That means it only affects dummy data, so I will get someone to manually enter our records for building. No worries at all.

    Thanks for the help and explaining
    Simon

    #406124

    Simon
    Full Member
    Post count: 35

    Just a quick question. I have deleted the demo data and manually added a place. Changed the functions file. Now it shows on the yards place on map,

    http://www.liveryyards.com/places/livery-stables/

    but not on home page.

    Something I am missing?
    http://www.liveryyards.com/

    #406136

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Simon,

    Looks like you resolved it, you probably just had to change the categories to show on the homepage widgets.

    Stiofan

    #406153

    Simon
    Full Member
    Post count: 35

    Actually no, i didn’t do anything. BUT because of your comment it made me do another check. I used a browser i hadn’t used before to check the site and there they were!

    So if anybody else has this issue. Even after adding changes or dummy data. They need to clear the browser cache, then reload the home page. I did that on google chrome, and they showed up a treat.

    So thanks for all the help.

    Side note, off topic sort of. I had a look through the directory setup. I couldn’t see anything about clearing the cache of home page map. Is there any? I am going to got through the files to see if there is a way to update the map cache after new businesses added or even daily.

    Sorry will be a few questions coming up. Will scan help files first thoroughly! I just realized we bought the 4 month package as a trial and it expires in 8 days… and of course we haven’t got round to testing it so need to get my lazy A** into gear.

    I am going to be asked about the renewal at the end of month I am sure!

    #406158

    Guust
    Moderator
    Post count: 29970

    That would just have been your browser cache, I am guessing.
    This may assist with caching questions:
    https://wpgeodirectory.com/docs/known-issues/#cacheplugins

    Thanks

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

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

Open Support Ticket