title: google map in sap.m.dialog sapui5
body: <p>I am calling a popup in my view (to show a map with some details) with the following code called EditDialog.fragment.xml</p>
  
  <pre><code>&lt;core:FragmentDefinition
    xmlns="sap.m"
   xmlns:core="sap.ui.core"
   xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"&gt;
  
   &lt;Dialog
  title="Edit Client Location"
  class="sapUiPopupWithPadding" &gt;
  
  &lt;VBox fitContainer="true" justifyContent="Center" alignItems="Center"&gt;  
      &lt;HBox id="map_canvas" fitContainer="true" justifyContent="Center" alignItems="Center" /&gt;  
  &lt;/VBox&gt;     
  </code></pre>
  
  <p>
     </p>
  
  <p>Within my controller I have the following code </p>
  
  <pre><code>    if (!this.Edit) {
          this.Edit = sap.ui.xmlfragment("motherclocker." + Edit
                  + "Dialog", this // associate controller with the
          // fragment
          );
          this.getView().addDependent(this.Edit);
      }
  
      this.geocoder = new google.maps.Geocoder();
      var mapOptions = {
          center : new google.maps.LatLng(-34.397,
                  150.644),
          zoom : 15,
          mapTypeId : google.maps.MapTypeId.ROADMAP
      };
      map = new google.maps.Map(this.Edit.getView().byId(
              "map_canvas").getDomRef(), mapOptions);     
  
      this.Edit.open();
  </code></pre>
  
  <p>Now the issue is I get the message <strong>Uncaught TypeError: Cannot read property 'getDomRef' of undefined</strong> . Normally for googlemaps  you just use this.getView() and it works just fine as I have used it in a normal view. I then tried </p>
  
  <pre><code>    map = new google.maps.Map(
              this.Edit.getId("map_canvas"), mapOptions)
  </code></pre>
  
  <p>This creates the map object but when the dialog is called; it is not shown. </p>
  
  <p>Anyone know a solution for this? Otherwise I will have to call a new view. </p>