I have a list of local and national resources associated with college campuses in the US. I'm using a list like the following:
Campus
Category 1
SubCat 1-1
Local Resource 1
Local Resource 2
National Resource 1
SubCat 1-2
etc...
This is created with nested views. Each resource has a Maps Address field associated with it. On the post edit or creation screen, when I put in a location, the API seems to be working and shows the location on a google map.
When I try to drop the Map/Marker into the above loop to display it in the list, it doesn't seem to be working. I probably am not configuring it correctly.
Oh, and I'm not using the block editor to craft the view because I needed to have better control over the HTML/CSS display of the elements, so I'm using the old code editor. Your docs seem to be built around slightly different use cases and based on the block editor.
Question 2: if instead of creating a map for each resource, I instead wanted to make a single map for the campus that showed markers for all associated resources, how would I do that, since I'm displaying the related resources now using this somewhat complex looped list above?
Thanks in advance.
When you say the marker ID must be unique, how can that be when they are in a loop? there will be several resources, all created by instances of the same loop, which means they will all have the same ID.
Here is the shortcode in the loop: [wpv-map-render map_id="map-3"][/wpv-map-render][wpv-map-marker map_id='map-3' marker_id='marker-3' marker_field='wpcf-campus-location'][/wpv-map-marker]
'wpcf-campus-location' is the Toolset Address field in the resource post.
Additionally, you didn't address question 2 above, which is how can I pull those local resources into a single map?
Thanks.
Q1) When you say the marker ID must be unique
In view's loop, you can use post ID as the marker ID, for example: marker-[wpv-post-id]
Q2) you didn't address question 2 above
I have already addressed the question:
make sure the map ID "map_id" of both map shortcode and marker shortcode are same value
So all markers will display in the map shortcode with the same map ID "map_id"