I am trying to:
Get a map to work using a business post type that has addresses
I have this in the loop editor:
[wpv-map-render map_id="map-1" map_width="100%" map_height="500px"]
and this in the loop template:
[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="[types field='address-business' output='raw'][/types]"]This is the content of the marker popup.[/wpv-map-marker]
Link to a page where the issue can be seen:
hidden link
I expected to see:
A map with hundreds of businesses on it
Instead, I got:
Just a blank map
Sorry, the error I'm getting is this:
google.maps.event.addDomListener() is deprecated, use the standard
addEventListener() method instead
Hi,
Thank you for contacting us and I'd be happy to assist.
The depreciation notice that you see in the browser's console is safe to ignore.
In the 'wpv-map-marker' shortcode, you just need to include the address field's slug with the 'wpcf-' prefix, for the 'marker_field' attribute:
( ref: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker )
[wpv-map-marker map_id="map-1" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="wpcf-address-business"]This is the content of the marker popup.[/wpv-map-marker]
This should fix it.
regards,
Waqar
My issue is resolved now. Thank you so much!