Tell us what you are trying to do?
I am using the old Views (not blocks) to design a CPT, with an address field.
I want to display map, with a marker for the dynamic field "Address".
I can display the map, but I am struggling to connect the map to the Address field.
Is there any documentation that you are following?
Not really. Links to some documentation are broken, and most of your documents deal with block view only.
Can you do a short recording of exactly what you've done so far so that I can best advise ?
In the classic view it should be as simple as inserting the map with the Fields and Views button and then just inserting the map marker with the correct target for the map ID.
However I need to know exactly where in the process you are having issues.
I'm struggling with the "then just inserting the map marker with the correct target for the map ID." part.
Where exactly does the value of the address field go? I've tried the below (adapted from some of your documentation), but no marker appears.
Thanks!
[wpv-map-render map_id="my-map" map_width="600px" map_height="300px" fitbounds="off" general_zoom="6" single_zoom="15" cluster="on"]
[wpv-map-marker map_id="my-map" marker_id="my-marker" marker_title="This is a marker" marker_field="[types field='facility_address'][/types]"]This is the content of the marker popup.[/wpv-map-marker]
I'm having problems with the "then just inserting the map marker with the correct target for the map ID." part. Where exactly do I put in the address field?
I've tried the below, adapted from your documentation, but no marker appears.
Thanks,
[wpv-map-render map_id="my-map" map_width="600px" map_height="300px" fitbounds="off" general_zoom="6" single_zoom="15" cluster="on"]
[wpv-map-marker map_id="my-map" marker_id="my-marker" marker_title="This is a marker" marker_field="[types field='facility_address'][/types]"]This is the content of the marker popup.[/wpv-map-marker]
I'm having problems with the "then just inserting the map marker with the correct target for the map ID." part. Where exactly do I put in the address field?
I've tried the below, adapted from your documentation, but no marker appears.
Thanks,
[wpv-map-render map_id="my-map" map_width="600px" map_height="300px" fitbounds="off" general_zoom="6" single_zoom="15" cluster="on"]
[wpv-map-marker map_id="my-map" marker_id="my-marker" marker_title="This is a marker" marker_field="[types field='facility_address'][/types]"]This is the content of the marker popup.[/wpv-map-marker]
Since you are using the classic editor for views, then you will format it like this.
[wpv-layout-start]
[wpv-map-render map_id="my-map" map_width="600px" map_height="300px" fitbounds="off" general_zoom="6" single_zoom="15" cluster="on"]
[wpv-items-found]
<!-- wpv-loop-start -->
[wpv-map-marker map_id="my-map" marker_id="my-marker" marker_title="This is a marker" marker_field="[types field='facility_address'][/types]"]This is the content of the marker popup.[/wpv-map-marker]
Or you can add the marker code inside the content template of this view. Either way should work as long as the marker is withing the wpv-loop-start tags.
It's still not working for me. I can render the map, but the map is not recognising the field address, so there is no marker on it. (The field address has been specified as type "address" in the CPT)
[wpv-map-marker map_id="my-map" marker_id="my-marker" marker_title="This is a marker" marker_field="[types field='facility_address'][/types]"] This is the content of the marker popup.[/wpv-map-marker]
[types field='facility_address'][/types]
(Note that the text for "facility_address" is rendering correctly under the map).