Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Google Maps Address API in CB Registration

  • MMDoege
  • MMDoege
  • OFFLINE
  • Posts: 98
  • Thanks: 3
  • Karma: 0
6 years 10 months ago #302766 by MMDoege
There're many sites using above API's to capture address data during registration.
Has anyone tried to implement this with CB Registration?

For our B2B community it is mandatory for users to specify postal address as this data is moved to a comprehensive geomapping and geotagging app. which plugs nicely into CB.
We have solved this by integrating some geodata databases which are being queried using a combo of Query/Ajax/Update on CB fields.
However this feels somewhat cumbersome, does not look great and becomes outdated over time, and is limited to those countries avail. in DB.

Any suggestions how to leverage Google Maps APIs for CB Registration?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48700
  • Thanks: 8317
  • Karma: 1447
6 years 10 months ago #302782 by krileon
Replied by krileon on topic Google Maps Address API in CB Registration
You can map an address or search for a business to a URL that opens Google maps in an external window without loading the map on your site. That's how CB Activity handles it since Google Maps API is highly intrusive (loading several tracking scripts). Below is the URL structures.

Address:
Code:
https://www.google.com/maps/place/ADDRESS_HERE

Search:
Code:
https://www.google.com/maps/search/BUSINESS_HERE

You'd probably need to use a Code action since you need to urlencode whatever ADDRESS_HERE or BUSINESS_HERE is (assume it'd be a text field for example). Example as follows for a Code action.

Code:
return '<a href="https://www.google.com/maps/place/' . urlencode( '[cb_address]' ) . '" target="_blank" rel="nofollow noopener">[cb_address]</a>';


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum