title: Can't make google maps nearby function work with callback
body: <p>So, I'm having to update some TypeScript codes written previously using setTimeout instead of Callbacks, the problem is that I can't make it work properly.</p>
  
  <p>The function using settimeouts is working, so there is no reason to be configuration related (libraries=places etc). Plus, I can see in the logs that it is actually working, but my map is plain gray.</p>
  
  <pre><code>map_initialize(callback) {
      navigator.geolocation.getCurrentPosition((position) =&gt; {      
  
        this.directionsService = new google.maps.DirectionsService();
        this.localizacaoAtual = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
  
        var mapOptions = {
          zoom: 8,
          center: this.localizacaoAtual
        }
  
        if (this.origem == "atual") {
          this.origem = this.localizacaoAtual;
        }
  
        callback({ mapOptions: mapOptions })
      });
    }
  </code></pre>
  
  <p>Now Im gonna call the function initialize</p>
  
  <pre><code>if (this.origem != null &amp;&amp; this.destino != null) {
  
          this.map_initialize((callback) =&gt; {
  
            if (this.tipoMapa == "rota") {
              this.map_calcRoute(callback);
  
            } else if (this.tipoMapa == "radius") {
  
              this.map_radius(callback);
            }
          });
      }
  </code></pre>
  
  <p>The first function being called on if, is the route map, which is actually working. But if I change the 'this.tipoMapa' value to 'radius', it won't load.</p>
  
  <pre><code>map_radius(mapOptions: any) {
      this.map = new google.maps.Map(document.getElementById('map'), mapOptions);
      let service = new google.maps.places.PlacesService(this.map);
      let start = this.origem;
      let end = this.destino;
  
        this.request = {
          location: start,
          radius: '1500',
          name: ['something here']
        }
  
      service.nearbySearch(this.request, (results, status) =&gt; {
        if (status === google.maps.places.PlacesServiceStatus.OK) {
          var stepDisplay: any = new google.maps.InfoWindow();
          for (var i = 0; i &lt; results.length; i++) {
            this.createMarker(results[i], stepDisplay);
          }
        }
          this.entrada = { mensagem: status, origem: this.origem, destino: this.destino, instrucoes: this.instrucoes };
          this.conversationService.sendMessage(this.entrada, this.context).subscribe(
            data =&gt; {
              this.conv_tratarRetorno(data);
            }, error =&gt; { }
          )
      });
    };
  </code></pre>
  
  <p>And then I have my createMarker function.</p>
  
  <pre><code>createMarker(place, stepdisp) {
  
      var marker = new google.maps.Marker({
        map: this.map,
        position: place.geometry.location
      });
  
      google.maps.event.addListener(marker, 'click', function () {
  
        stepdisp.setContent(place.name);
        stepdisp.open(this.map, marker);
      });
    }
  </code></pre>
  
  <p>So basically when I call a route function, it works as indeed, but if I call a radius function it returns a gray map but with the right logs.</p>
  
  <p>Thanks in advance!</p>