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:
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.
how can have same resolution?
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?
Comments
Post a Comment