diff --git a/src/platforms/h5/view/components/map/maps/callout.js b/src/platforms/h5/view/components/map/maps/callout.js index 545e2f97d89..c0a61a1e4e5 100644 --- a/src/platforms/h5/view/components/map/maps/callout.js +++ b/src/platforms/h5/view/components/map/maps/callout.js @@ -171,7 +171,11 @@ export function createCallout (maps) { } if (!IS_AMAP) { const prototype = Callout.prototype - const overlay = new (maps.OverlayView || maps.Overlay)() + let overview = maps.OverlayView || maps.Overlay + if(!overview){ + throw "请设置地图 key,以及在模版中引用平台方提供的 sdk script 脚本" + } + const overlay = new (overview)() for (const key in overlay) { if (!(key in prototype)) { prototype[key] = overlay[key]