Skip Navigation

[Resolved] List users and view them on map based on address (user custom field)

This support ticket is created 2 years, 1 month 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#2598031

I am building a site where users can register and fill in their address. After they have filled in their address (either an Address field or Single line field).

I am trying to create an admin view where the admin could see all the users on a map based on this address field.

The problem is, a view block can't display content type of Users so it can't be used as a source for the markers on a map this way. A map also doesn't recognize a View as a source for the markers.

How can I go about creating a map like this?

#2598417

Hello,

Yes, you are right, view block does not support user view yet.

In this case, it needs legacy view, for example:
1) Enable legacy view:
https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

2) Dashboard-> Toolset-> Views
Create a new user view:
- Query users
- In view's loop,
within [wpv-items-found] ... [/wpv-items-found] shortcode, display the map shortcode
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render
within <wpv-loop> ... </wpv-loop>, display the marker shortcode
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker