Street Static Date

I am using the Google Street View still image API. It works great, but I wonder if it is possible to get metadata for images that I save, in particular, the date. Does anyone even know the date of the static image?

Thanks Lee

+4
source share
2 answers

Yes, you can get the date of the image using the Google Maps Street View Service in JavaScript.

In short, you need to go through the usual setup steps to make Google Maps work on your page, then you will do something similar to

var sv = new google.maps.StreetViewService(); var berkeley = new google.maps.LatLng(37.869085,-122.254775); sv.getPanoramaByLocation(berkeley, 50, function(data) { console.log(data.imageDate); }); 

data.imageDate will contain the date in YYYY-MM format.

You can use the StreetViewService methods of both getPanoramaById and getPanoramaByLocation to get this data. Please see here .

+2
source

var panoramaOptions = {position: streetViewLocation, pov: {headline: 0, Step: 5, increase: 1}, visible: true, addressControl: false, imageDateControl: true };

0
source

Source: https://habr.com/ru/post/1469405/


All Articles