site-kit-wp
site-kit-wp copied to clipboard
Uncaught TypeError: Cannot read property 'OverlayView' of undefined
Bug Description
Installing site kit in Wordpress causes other .js file with map overlay code to break.
"object" == typeof google && (CustomMarker.prototype = new google.maps.OverlayView), CustomMarker.prototype.draw = function() {
var e = this.div;
if (!e) {
e = this.div = document.createElement("div");
var t = this.templateData.itemId;
e.className = "mkdf-map-marker-holder", e.setAttribute("id", t), e.setAttribute("data-latlng", this.latlng);
var a = _.template(j(".mkdf-info-window-template").html());
a = a(this.templateData);
var o = _.template(j(".mkdf-marker-template").html());
o = o(this.markerData), j(e).append(a), j(e).append(o), e.style.position = "absolute", e.style.cursor = "pointer", this.getPanes().overlayImage.appendChild(e)
}
var i = this.getProjection().fromLatLngToDivPixel(this.latlng);
i && (e.style.left = i.x + "px", e.style.top = i.y + "px")
}, CustomMarker.prototype.remove = function() {
this.div && (this.div.parentNode.removeChild(this.div), this.div = null)
}, CustomMarker.prototype.getPosition = function() {
return this.latlng
},
Error: Uncaught TypeError: Cannot read property 'OverlayView' of undefined
Steps to reproduce
Go to 'https://www.andreaabroad.com/wp-content/themes/backpacktraveler/assets/js/modules.min.js?ver=5.7.2' Error: Uncaught TypeError: Cannot read property 'OverlayView' of undefined
Screenshots
Additional Context
Works after disabling site kit
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
@rishnarang All support for the Site Kit plugin is provided on our WordPress.org support forum. If you create a new topic there, we'd be happy to take a look and help you troubleshoot. Thanks!