Hi there,
on my website I have Areas, which are parent of Sectors.
Each Sector has one location.
Each Area page has a map displaying all the sectors on that Area.
hidden link
I want to create a page listing all the Areas, with a general map showing all the Sectors.
hidden link
I am struggling trying to create such a map.
Could you help?
Thanks so much
Ivan
Hi,
Yes, it is possible, it needs a nested view, for example:
1) Parent post view, query "Areas" posts, in the "Loop Editor" section, outside views loop <wpv-loop> ... </wpv-loop>, display the map shortcode, for example:
[wpv-map-render map_id="my-map" ...]
Within views loop, display Areas post information + below child post view
2) Child post view, query child "Sectors" posts, filter with:
post type relationship between "Areas" and "Sectors"
within views loop, display the marker shortcode, for example:
[wpv-map-marker map_id="my-map" marker_id="my-marker- [wpv-post-id]" ...]
More help:
https://toolset.com/documentation/user-guides/maps-shortcodes/
Hi Luo,
unfortunately I have not been able to follow the instructions above. I have tried a few combinations but to no avail.
Could you please check the details below and let me know how I should do where I have put Question Marks? Thanks soooo much
Parent View
- Content Selection: Areas
- Query Filter: ????
- Loop Editor:
[wpv-map-render map_id="all-sectors"][/wpv-map-render]
<wpv-loop>
???? [wpv-child-view-id]
</wpv-loop>
Child View
- Content Selection: Sectors
- Query Filter: Post Relationship - Posts that are children of the Post where this View is shown.
- Loop Editor:
<wpv-loop>
[wpv-map-marker map_id="all-sectors" marker_id="my-marker-[ ???? ]" ...]
</wpv-loop>
Please provide a test site with the same problem, also point out the problem page URL and view URL, I can setup a demo for you
Thanks for the details, I can login your website, but the account you provided above is not an administrator, so I can not edit the views, for example:
hidden link
I get this error message:
You do not have sufficient permissions to access this admin page.
Reason: The user "Testing" doesn't have the "manage_options" capability that is required to access the "Toolset → Edit View" menu item.
You can setup the user "Testing" as an administrator, then update this thread again.
Hi Luo,
Sorry for that. I have updated your profile Capabilities. Can now add, edit and delete all.
Ivan
I have done below modifications in your website:
1) Edit the page
hidden link
Display the google map shortcode directly:
[wpv-map-render map_id="all-sectors" map_height="500px"][/wpv-map-render]
2) Edit the child view:
hidden link
in section "Loop Editor", display the map marker shortcode:
[wpv-map-marker map_id='all-sectors-2' marker_id='marker-[wpv-post-id]' marker_field='wpcf-sector-location'][/wpv-map-marker]
Please test again, check if it is fixed, thanks
My issue is resolved now. Thank you!