Generating map on this example page:
hidden link
Map render shortcode appears to be working fine. Map marker code seems to be placing the map marker correctly. But a click on the marker does not produce the intended pop-up via the CONTENT TEMPLATE inserted in the map marker. Here is relevant code >>>
LEGACY VIEW loop code:
[wpv-layout-start]
[wpv-items-found]
[wpv-map-render map_id='map-mexico' map_height='620px' map_type_control='off' street_view_control='off' marker_icon='hidden link' marker_icon_hover='hidden link;
<!-- wpv-loop-start -->
<wpv-loop>[wpv-map-marker map_id='map-mexico' marker_id='[wpv-post-id]' marker_icon="hidden link" marker_icon_hover="hidden link" lat='[types field="location-latitude"][/types]' lon='[types field="location-longitude"][/types]'][wpv-post-body view_template="review-map-infowindow-english"][/wpv-map-marker]</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
No items found
[/wpv-no-items-found]
[wpv-layout-end]
VIEW CONTENT TEMPLATE code:
<div class="infowindow-div-1">
[wpv-post-featured-image class="aligncenter" size="custom" width="200" crop="true" item="@post_cpt-restaurants-loc.parent"]
<h6 style="color: white; line-height: 1.2em; padding: 10px;">[wpv-post-link id="$post"]</h6>
<div style="padding-bottom: 10px;">
<b>Location:</b> [wpv-post-taxonomy type="restaurant-locale" format="name"]
[types field='address_acf' output='raw'][/types]
<b>Tel:</b> [types field='phone_tstypes'][/types]
<b>Type:</b> [wpv-post-taxonomy type="restaurant-type" format="name" id="$post"]
<b>Price:</b> [wpv-post-taxonomy type="restaurant-cost" format="name" id="$post"] <b>Rating:</b> [wpv-post-taxonomy type="wp-category-restaurant-rating" format="name" id="$post"] stars
<b>Hours:</b><br/>
[types field='cfh-1' output='raw'][/types]
[types field='cfh-2' output='raw'][/types]
[types field='cfh-3' output='raw'][/types]
</div>
</div>
CSS for this template:
.infowindow-div-1 {
max-width: 300px;
background-color: black;
color: white;
text-align: center !important;
padding-left: 15px;
padding-right: 15px;
margin-top: 10px;
margin-bottom: 10px;
}
CONSOLE errors/warnings:
js?libraries=places&v=3&callback=Function.prototype&key=AIzaSyCXbfBxucRt1JBeA6VRW2Zt3ZeOZ7C7fes:1374 Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see hidden link
****
js?libraries=places&v=3&callback=Function.prototype&key=AIzaSyCXbfBxucRt1JBeA6VRW2Zt3ZeOZ7C7fes:1297 As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. At this time, google.maps.Marker is not scheduled to be discontinued, but google.maps.marker.AdvancedMarkerElement is recommended over google.maps.Marker. While google.maps.Marker will continue to receive bug fixes for any major regressions, existing bugs in google.maps.Marker will not be addressed. At least 12 months notice will be given before support is discontinued. Please see hidden link for additional details and hidden link for the migration guide.
Hi,
Welcome top Toolset support.
I suggest that you use the shortcode generator button with Toolset logo in the classic editor that you use to add the mao and test.
I see some errors such as inconsistencies on using http and https on the links, having empty content for markers and so on.
So it is better that you create a map using the tool with a minimal setup and test. If it works ok then start adding your cusotmization.
Thanks.