sap.m.dialog sapui5中的谷歌地图
我正在调用视图中的一个弹出窗口(显示带有一些细节的地图),代码名为EditDialog.fragment.xmlsap.m.dialog sapui5中的谷歌地图,dialog,popup,maps,sapui5,Dialog,Popup,Maps,Sapui5,我正在调用视图中的一个弹出窗口(显示带有一些细节的地图),代码名为EditDialog.fragment.xml <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"> <Dialog title="Edit Client Location"
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1">
<Dialog
title="Edit Client Location"
class="sapUiPopupWithPadding" >
<VBox fitContainer="true" justifyContent="Center" alignItems="Center">
<HBox id="map_canvas" fitContainer="true" justifyContent="Center" alignItems="Center" />
</VBox>
现在的问题是,我收到消息uncaughttypeerror:cannotreadproperty'getDomRef'of undefined。通常对于googlemaps,您只需使用这个.getView(),它的工作原理与我在普通视图中使用的一样好。然后我试着
map = new google.maps.Map(
this.Edit.getId("map_canvas"), mapOptions)
这将创建贴图对象,但在调用对话框时;它没有显示
有人知道这个问题的解决方案吗?否则我将不得不调用一个新视图 您可以使用以下方法访问对话框:
sap.ui.getCore().byId("map_canvas")
对话框不是常规视图的一部分,但它们被添加到“它的顶部”。这就是为什么不能通过视图引用它们
问候,,
金姆
sap.ui.getCore().byId("map_canvas")