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?
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