Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to street view URL using address?

Is it possible to link directly to street view from an URL using only the address (and not lat/lng)?

For example, is there a way to do something like

http://maps.google.com/maps?q=&layer=c&address=Street,number,state&cbp=11,0,0,0,0

Instead of

http://maps.google.com/maps?q=&layer=c&cbll=31.335198,-89.287204&cbp=11,0,0,0,0

?

Lat/lng from geocoding tends to not be recognized by street view as being too far from a street, sometimes getting the wrong street altogether, because the lat/lng it generates may be off the street, as it tries to match the location of a house.

I have looked everywhere and even tried playing with google's URLs on my own, but I can't find anything on it. Most sources won't even mention address. I'm currently using the url sample from this question, but it still isn't really what I'm looking for.

If this is really not possible, could someone link to a source/documentation where it says so?

Edit: Thank you everyone for the answers, but none really address the issue with street view and addresses. I'll look into forwarding this to google. I'll post here if I get a reply.

like image 911
Forty Avatar asked Nov 08 '22 12:11

Forty


1 Answers

Let's enhance your code, if you paste the code in browser then you will be redirect to google maps and will show result what you requested.

http://maps.google.com/maps?&q=Space+Needle,Seattle+WA

If you would like to pass the value (address) via php or any other code type then simply it will not work, you cannot use google maps without API to enhance your requirement. Lat & Lng is basic practice to show map and not require any api, but if you would like to pass additional properties then you will have to use google maps api to do so. Detailed documentation can be found here

https://developers.google.com/maps/documentation/embed/guide

but let's try an example try this code in browser

https://www.google.com/maps/embed/v1/place?q=Mumbai,+Maharashtra,+India

You will get an error that api key not found but if you try this one

https://www.google.com/maps/embed/v1/place?key=AIzaSyD4iE2xVSpkLLOXoyqT-RuPwURN3ddScAI&q=Space+Needle,Seattle+WA

Then you will get output. Hope it helps!

like image 111
Sachin G. Avatar answered Nov 15 '22 06:11

Sachin G.