Directory with Google Maps

I followed directions and some threads here related to integrating google maps to directory. However, I think it worked but when I enter the long and lat - the marker is not showing in the right place. There is also no map icon on Add Listing page.
Also, question1: Is there a way for a user to simply drag the marker to their location without the long and lat fields to make it user friendly?
q2: On category lists, how to show the sub of subs?
q3: Is specifying certain State possible on Google Maps like California only so user won't be able to mark locations outside California?
q4: How to show location field in the Add List page?
Already granted support access for a better look.

Many thanks,

Jo

  • Adam Czajczyk

    Hello Jo,

    I hope you're well today and thank you for your question!

    I followed directions and some threads here related to integrating google maps to directory. However, I think it worked but when I enter the long and lat - the marker is not showing in the right place. There is also no map icon on Add Listing page.

    I checked your site and I can see the issue. After checking maps setup and configuration I can say that it all looks good. I have however noticed that there's a crucial error reported in a browser console that suggests that map may have not been initialized properly.

    I wasn't able to replicate this issue on my setup so an essential step here would be the basic troubleshooting first. That said, please perform a full theme/plugin conflict test as described on a flowchart in this article (you may need to scroll the page down a bit):

    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Let me know about the results please. Hopefully it will reveal the main culprit.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello gagabytes!

    Thank you for your response!

    Your information about duplicate API helped a lot.

    I accessed your site again and checked Google Maps settings again. Then I created a test post with a map and noticed that all the existing maps are properly displayed in backend but not in front-end.

    I have then switched the theme to the Twenty Fifteen first and Twenty Sixteen second (I know that you did that already) and... maps started to work, furthermore it looked different. That got me to thinking that it's not that the map was displayed wrong but that the wrong map was used.

    The Themify theme has in-built Google Maps support. This was causing the conflict. I have used "Settings -> Google Maps -> Options" page and then "Settings -> Google Maps -> Fixes and Repairs" tool to change the default "[map]" shortcode of our Google Maps to an alternative "[agm_map']" shortcode across the site and it's all working now.

    Both map in the post and map on directory listing are displayed as they are set so future listing should also be working fine from now.

    Best regards,
    Adam

  • Dimitris

    Hey there gagabytes,

    hope you're doing good and don't mind chiming in!

    Another question, how to make the map button appear on Add Listing page for user to use so it will be easier for them to mark their address on the map than using long and lat? Is there some codes that can hook for this?

    The popup functionality to add a map is implemented only for the backend pages at the moment. This most probably would require some custom work (feel free to advise our Jobs & Pros section), despite that I already asked the corresponding dev and I'll let you know if there's something that we can do as soon as he's online and get back to me. :slight_smile:

    Warm regards,
    Dimitris

  • gagabytes

    Hi Thanks diDimitris .
    Hope there is something we can do about it. My first time to use these plugins - abit confusing at start as I have to read several plugins instructions while looking for other possibilities to make listing business user-friendly. I have other questions though.
    Q1: How to rename those default meta?
    Q2: How to restrict the user to map locations within region only?
    Q3: Is there an autocomplete for category taxonomy? As categories are long to scroll down.
    Q4: Do you think if we just enqueue the Google Maps script (https://themify.me/docs/enqueue-scripts) or build as an addon module https://themify.me/docs/coding-builder-modules will work to show map on the frontend (Add Listing Page)?

    Many thanks,

    Jo

  • Predrag Dubajic

    Hi Jo,

    Q1: How to rename those default meta?

    Google Maps comes with translation files which you can use to change plugin text.

    Q2: How to restrict the user to map locations within region only?

    Unfortunately something like this is not possible, plugin will always provide entire world map for choosing location and it can't be limited to specific region.

    Q3: Is there an autocomplete for category taxonomy? As categories are long to scroll down.

    I'm not sure that I understand this question completely, could you give us an example of where and how this should work?

    Q4: Do you think if we just enqueue the Google Maps script (https://themify.me/docs/enqueue-scripts) or build as an addon module https://themify.me/docs/coding-builder-modules will work to show map on the frontend (Add Listing Page)?

    I had a look at their documentation and in theory this should be possible but I never had a chance to create themify module before so we can't give any guarantees if and how this would work.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.