Abrufen URL von Google Places API Foto Antwort

stimmen
1

Ich arbeite mit einer Bot-Plattform, wo ich eine Bild-URL liefern Bilder anzuzeigen.

Google Places Photo Response ist ein Bild statt einer URL. Jede Art und Weise eine URL abzurufen?

Ich verwende NodeJS Anfrage

var options = { method: 'GET',
  url: 'https://maps.googleapis.com/maps/api/place/photo',
  qs: 
  { maxwidth: '400',
    photoreference: photoreference,
    key: Google_Places_KEY },
  };

request(options, function (error, response, body) {
 // Code goes here. 
 });

Meine Lösung ist im Moment das Foto auf meinen Server zu laden, erstellen Sie eine URL und liefert das. Gibt es eine bessere Abhilfe?

Veröffentlicht am 20/11/2016 um 18:43
quelle vom benutzer
In anderen Sprachen...                            


1 antworten

Abrufen URL von Google Places API Foto Antwort

stimmen
1

Ich arbeite mit einer Bot-Plattform, wo ich eine Bild-URL liefern Bilder anzuzeigen.

Google Places Photo Response ist ein Bild statt einer URL. Jede Art und Weise eine URL abzurufen?

Ich verwende NodeJS Anfrage

var options = { method: 'GET',
  url: 'https://maps.googleapis.com/maps/api/place/photo',
  qs: 
  { maxwidth: '400',
    photoreference: photoreference,
    key: Google_Places_KEY },
  };

request(options, function (error, response, body) {
 // Code goes here. 
 });

Meine Lösung ist im Moment das Foto auf meinen Server zu laden, erstellen Sie eine URL und liefert das. Gibt es eine bessere Abhilfe?

Beantwortet am 20/11/2016 um 18:43
quelle vom benutzer

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more