Skip Navigation

[Resolved] Trying to display name, address & phone when clicking on map icon

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display Types shortcode with map marker

Solution:
You should simply add Types shortcodes with marker shortcode.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/trying-to-display-name-address-phone-when-clicking-on-map-icon/#post-630520

Relevant Documentation:

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by toddS 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#630418
Screen Shot 2018-04-01 at 5.43.06 PM.png

I am trying to: Have the Dealer Name display when I hover over the map icon. Then have the Dealer Name, Address & phone display once I click on the map icon.

Link to a page where the issue can be seen: hidden link

I expected to see: I have created a custom user called Dealer. I have created custom fields for the Dealer, including Dealer Name, address, phone and some others, but I'm only trying to display name, address & phone on the maps. I have registered the short codes for the custom fields. In the debug info I have attached the code used in my View (Find A Dealer), which doesn't work, but maybe you can guide me as to what I need to change to get it to display properly. Currently, I have changed the code back to what displays the map, but it is generic.

The site is strictly a development site at this point, so there is nothing to damage if you want to access the backend and give it a go.
Access is: hidden link
User: baracuda
Pass: Gator!07

Thanks, you guys rock!

Instead, I got:

#630520

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - there is no need to register the shortcodes for those fields as you can obviously display custom user fields using the Types shortcode.

I've updated your view's loop output as given under:

<wpv-loop>
[wpv-map-marker map_id="map-1" marker_id="marker-10" marker_title="Dealer Name" marker_usermeta="wpcf-dealer-address"]
      Dealer Name: [types usermeta='dealer-name' output='raw'][/types] <br />
      Dealer Address: [types usermeta='dealer-address'][/types] <br />
      Dealer Phone: [types usermeta='dealer-phone' output='raw'][/types]
[/wpv-map-marker]
	</wpv-loop>

And I can see that its displaying the dealer information.

#630763
Screen Shot 2018-04-02 at 9.18.18 PM.png

Thanks Minesh! That's looks beautiful, just what I'm looking for. However, now when I go and add additional Dealers, they don't show up on the map, only the two original pins show up, and it doesn't make any sense at all why?!? I've created a Form using CRED to register Dealers, (a custom role in WP created with Types). I've tried adding Users with the form as well as adding through the backend, and neither displays. What am I missing? Thanks Minesh.

#630824

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The issue is your google API key. You should create a unrestricted google API key and register at:
=> Toolset => Settings => Maps tab => Google Map API key

More info:
=> https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/

If you are experiencing problems with displaying markers on a map, try creating a Google map API without adding a domain name. Many users confirmed that this issue was resolved when using a non-restricted key.

For now - I've added my API key for testing - please remove it once you create your unrestricted (without domain) API key.

#630968

Minesh, you are awesome! Thank you so much. Do you know when there might be the ability to do a Search on the map for Users (I see you can for Post Types, I didn't realize you can't search Users until I almost finished project@!). Thanks for all you guys and gals do at Toolset and keep up the great work!
Todd Smith