Map not displaying on front end
-
Recently after some changes throughout my site, utilizing the map field has stopped working. The field shows in the backend editor, but the front end just displays a blank div. It’s still outputting all of my info (lat long, map key, div sizing, etc) but the map itself isn’t showing. I’ve tried disabling plugins (and updated Metabox) to no avail, as well as a new API key just in case.
I’m trying to access past versions of files to see if I can pinpoint a change that may have broken it further.
Hoping someone might have an idea as to where I could look to see what’s causing the issue if they’ve experienced something similar.
Code:
<?php args = array( 'type' => 'map', 'width' => '100%', // Map width, default is 640px. Can be '%' or 'px' 'height' => '500px', // Map height, default is 480px. Can be '%' or 'px' 'zoom' => 14, // Map zoom, default is the value set in admin, and if it's omitted - 14 'marker' => true, // Display marker? Default is 'true', 'marker_title' => '', // Marker title when hover ); echo rwmb_meta( 'loc', $args ); // For current post ?>Which displays the following HTML on my template file, but the browser doesn’t render the map:
<div class="rwmb-map-canvas" data-map_options="{"latitude":"33.540005375644775","longitude":"-84.6433209079346","width":"100%","height":"500px","marker":true,"marker_title":"","info_window":"","js_options":{"zoom":14,"mapTypeId":"ROADMAP"},"zoom":14,"api_key":"AIzaSyDN7fAa4U_ofKiAmZKwV02tSq66X6hYxEk","type":"map"}" style="width:100%;height:500px"></div>Thank you!
The topic ‘Map not displaying on front end’ is closed to new replies.