javascript - Resolution of places photos using js and google maps api v3 (places library) -


i developing web site can display photos of few places. photos this:

var photos = typeof place.photos !== 'undefined' ? place.photos[0].geturl({ 'maxwidth': 100, 'maxheight': 125 }) : ''; if (photos.length) {//...//} 

unfortunately, when want display photos appear bad definition:

enter image description here

note: display photo w3schools slideshows , set photos this:

var images = document.getelementbyid("photofond").getelementsbytagname("img"); (i=0; i<images.length; i++;) {      if (!photosslide[i]) {return;}     images[n - 1].src = photosslide[i];  } 

however, when go google maps , find same photo (link same photo), quality better.

enter image description here

how can have same resolution?

docs

photos[]: array of placephoto objects. placephoto can used obtain photo geturl() method, or can inspect object following values:

height: maximum height of image, in pixels.

width: maximum width of image, in pixels.

html_attributions: attribution text displayed place photo.

.geturl({ 'maxwidth': 1000, 'maxheight': 1250 }) // set higher resolution, no? 

google-place-api-placedetails-photo-reference


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -