Why is google streetview not displaying image for some coordinates? - google-maps

I am having an issue where some coordinates are providing correct streetview image while others are off by several lots. For example, the coordinates for 42.4025192834409,-83.1636018491871 in streetview bring me to the intersection nearby. If I enter those coordinates into google maps the pin location is correct but then I can't drag the streetview icon in that section. Is there anything we can do differently with our coordinates so that they go to correct location for streetview?

When I search for the address it works as you are seeking. I think this is the discrepancy you are experiencing:
https://developers.google.com/maps/documentation/streetview/intro
The Google Street View Image API will snap to the panorama photographed closest to this location. When an address text string is provided, the API may use a different camera location to better display the specified location. When a lat/lng is provided, the API searches a 50 meter radius for a photograph closest to this location.
You may want to try reverse geocoding.

Try again now.
https://maps.googleapis.com/maps/api/streetview?size=640x480&location=42.4025192834409,-83.16360184918&fov=90
When I read your question two days ago, it was actually getting the wrong panorama. I tried again today and it finally got the closest panorama to those coordinates. I guess it was an issue on Google's end.

Related

Create Google Maps links based on coordinates - bug pin position

i tried make link to Google maps and place pin in position based on coordinates.
Make this link is not problem. When I click on this link and check pin position, then I see not correct position.
I tried reached areal of "Brutal Assault festival" (for example - another places have same bug).
Link to this place on Google maps - https://www.google.cz/maps/place/Festival+Brutal+Assault/#50.3404166,15.9333541,17z/data=!3m1!4b1!4m5!3m4!1s0x470e7de678b98f57:0x775f2cf0460db4c2!8m2!3d50.3404166!4d15.9355428
1st try:
https://www.google.com/maps/place/50.3404166,15.9333541
this link Google transformed to:
https://www.google.com/maps/place/50%C2%B020'25.5%22N+15%C2%B056'00.1%22E/#50.3404166,15.9311654,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d50.3404166!4d15.9333541
Here is problem my coordinates are "50.3404166,15.9333541", but in final Google link I see "50.3404166,15.9311654". But I donĀ“t know why... 1st coordinate Google allowed, but 2nd changed... Why???
2nd try:
http://maps.google.com/maps?q=50.3404166,15.9333541
Same final link on Google, same result, same bad placed pin...
3nd try:
https://www.google.com/maps/search/?api=1&query=50.3404166,15.9333541
Same final link on Google, same result, same bad placed pin...
4th try:
I tried to round off coordinates, but nothing happend. When I rounded to only two decimal places then I get different place. But this is logical only "two decimal" is few.
The latitude and longitude after the # sign is the center of the map, not the location of the place you searched for.
The coordinates of that place are in the data portion of the URL:
data=!3m1!4b1!4m5!3m4!1s0x470e7de678b98f57:0x775f2cf0460db4c2!8m2!3d50.3404166!4d15.9355428
at the very end: !3d50.3404166!4d15.9355428
link
related:
How do I get the address and coordinates given this google place url?
Finding the lat/long coordinates in a Google Maps URL

Google StreetView - Not very accurate when displayed using an URL with the "cbll" parameter

We try to show some adresses on StreetView using a link. We have the latitude/longitude for those adresses, and we open StreetView using :
http://maps.google.com/maps?q=&layer=c&cbll=[LATITUDE],[LONGITUDE]
This works, but StreetView is not positionned right in front of the adress. It is very near, but not perfect... Clearly not as accurate as when we search for the same adress directly in Google Maps, which adds a very precise marker right in front of the adress.
We even tried to use the Google Geocoding API to convert the adresses to latitude/longitude... Same result : by using those lat/long in the URL for StreetView, the position is near but not that precise.
How we missing something?
Is the StreetView "cbll" parameter approximate by design?

API to display the nearest photos to a long/lat location from Google Maps Views (like Panoramio)

Forgive me if this has already been asked but searching on 'Google Maps Views' brings up rather a lot of irrelevant hits.
Is there an API to display the nearest (say) 5 photos to a particular long/lat location from the photos available on Google Maps Views? I don't particularly need them on a map, just to embed thumbnails of the photos and link to the originals.
eg I have a page for Callanish stone circle. Could I embed images from Views based on a long/lat query?
Here's what is on Views for that location:
https://www.google.com/maps/views/explore?hl=en&gl=gb&vm=1&ll=54.596562,-3.104517&bd=54.586641,-3.121855,54.606481,-3.087179&z=15&pv=2
I read that Views is what is supposed to be taking over from Panoramio. I know Panoramio had an API but that's being shut down.
If this is possible, does anyone have an example of something similar? Showing photos on a map would be OK if that's the only way to do it.
Many thanks
Andy
http://www.megalithic.co.uk/article.php?sid=42
The Google Maps API can do it and the imagery carousel at the bottom of Google Maps website is a good example of it.
Nearest photos
You can retrieve the nearest photos to a location using the Places Photo feature, which is part of the Places library. As you want multiple photos, you need to use Place Details requests - function getDetails(). It will return up to ten PlacePhoto objects.
You probably want to submit a small height/width since you create thumbnails. And send another request with a larger height/width when a thumbnail is clicked.
Nearest Street View panorama
If, by chance, a road close to Callanish stone circle has been photographed by Street View, you can add this imagery as well.
Requests for Street View panoramas include a radius parameter. The callback function returns the nearest imagery within the requested radius. See this example. Thereby, you can retrieve one panorama by passing a very large radius.

Google Streetview - No French images working?

I am attempting to use the Google Streetview API to grab streetview images. My code works for every country except France. For some reason, when I try to grab data from anywhere in France, I just get back the gray image that says "Sorry, we have no imagery here." But, I know there is imagery there because I can use the google streetview via your google website and see the streetview.
For example, if I go to https://maps.google.com/maps/ms?ie=UTF8&oe=UTF8&msa=0&msid=101555744172859669534.00044f7fe84800c56d7a6&dg=feature and input the GPS coordinates "48.856638,2.352241", I can see the streetview data. However, if I go to http://maps.googleapis.com/maps/api/streetview?size=308x263&location=2.352241,48.856638&fov=120&key=[myAPIkey] I get back the gray image that says "Sorry, we have no imagery here." I have also tried reversing the order of the GPS coordinates in the URL string (i.e., "48.856638,2.352241"), and I still get back the image that says "Sorry, we have no imagery here."
Any idea what I'm doing wrong or why this might be occurring?
It looks like you're not getting an image because the coordinates are in the middle of a building. Try moving them to a street, like 48.857213,2.352617 and you should then get an image.
https://maps.googleapis.com/maps/api/streetview?size=308x263&location=48.857213,2.352617&fov=120
If you enter coordinates that are slightly wrong on Google Maps it will redirect you to the nearest working coordinates automatically. The api also has a function for near or close to.

Placing Hotels having same Geo-Coordinates

I am facing a problem that in a teretorry I have to display 6 Hotels with info windows but the problem is that all having the same geo coordinates.
Is there a way that despite having the same coordinates all are visible?
Thanks
I guess the hotel coordinates (latitude/longitude) are from a different API like expedia or so.. The hotel APIs sometimes provide only area coordinates.
I would try to solve the problem by the address and not by the coordinates. Just get the hotel address from the hotel API and use Google Maps Api to show the hotels by that address.
If that isn't an area coordinate you can use a special marker as a placeholder and print all information in the infowindow.