The same URL gives different results via Mobile & Desktop.
A certain URL format for street view displays different results on different devices.
This is a starting reference for the URL's format: Google street view URL
When I load this URL:
http://maps.google.com/maps?q=&layer=c&cbll=40.741895,-73.989308
in chrome via Desktop: I get a street view of a beach
in chrome via Android Mobile device: I get a street view of a street in New York (the correct response)
It seems that google presents via desktop a view (photo) that was made by a user and via Mobile a photo that was made by google.
But in another url:
http://maps.google.com/maps?q=&layer=c&cbll=32.0522032,34.7633459
in chrome via Desktop: I get the correct street view, made by google
in chrome via Android Mobile device: "No results found for your search"
I guess this bug doesn't effect Google because they use a different entry point for street views in their services...
My goal is to present a Google Street View in a webview in an Android app and I'm trying to get the correct URL format for that.
Does anyone know what is the correct format?
The officially supported and recommended by Google way is using Google Maps URLs. Google Maps URLs allow create universal cross-platform URLs that can be used both on desktop and mobile devices and support street view mode
The pano action lets you launch a viewer to display Street View images as interactive panoramas. Each Street View panorama provides a full 360-degree view from a single location. Images contain 360 degrees of horizontal view (a full wrap-around) and 180 degrees of vertical view (from straight up to straight down). The pano action launches a viewer that renders the resulting panorama as a sphere with a camera at its center. You can manipulate the camera to control the zoom and the orientation of the camera.
You example may be rewritten using Google Maps URLs
https://www.google.com/maps/#?api=1&map_action=pano&viewpoint=40.741895,-73.989308
However, unfortunately, it gives me a beach street view on desktop. I believe this is a data issue on Google side and you can report a problem to Google using the Report a problem link in bottom right corner of the map.
In the meantime I can suggest the following workaround. You can use Street View API metadata service to get a pano ID of the point you are interested in
E.g. https://maps.googleapis.com/maps/api/streetview/metadata?location=40.741895%2C-73.989308&source=outdoor&key=YOUR_API_KEY
Note that this service is free of charge and doesn't consume your quota
Street View Static API metadata requests are free to use. No quota is consumed when you request metadata.
Also it supports a source parameter that allows filter out non-Google panoramas. In aforementioned example I get the following metadata response
{
"copyright":"© Google, Inc.",
"date":"2017-11",
"location":{
"lat":40.7419078,
"lng":-73.9893223
},
"pano_id":"qH-ml27SSSYEXUCTT2NrhQ",
"status":"OK"
}
So, now I can create a Google Maps URL using a pano ID that will open expected street view panorama
https://www.google.com/maps/#?api=1&map_action=pano&pano=qH-ml27SSSYEXUCTT2NrhQ
I hope this helps!
Related
I have created a tool, in which there are different links for different street views.
But, my client says, when going from one street view to another, some tiles of previous street view doesn't disappear immediately. I told him its normal. I tried to find the solution for it, but there's nothing written to improve the loading time in the documentation. And, couldn't find on any other site/blog.
Can i do something like flash version of Google Maps? In Google Map's flash version it shows the whole street view as blurred image and then loads the tiles one by one. I don't know how to do that in v3 which is based on Javascript. (I'm using Google Maps API v3)
I am currently working on a lightweight WPF control for WPF using the output=embed urls for the maps I need.
I have 2 purposes for the map control one is to get the FSA boundaries for Canadian postal codes and to show traffic conditions for a given address for a appointment tracking system for field agents
ie
FSA https://maps.google.com/maps?q=m3j%20canada
Postal Code : https://maps.google.com/maps?q=M3A%201A3%20canada
which show up in a query to regular Google maps but once the output=embed is added to the url the boundaries disappear from the map
is there a way include these in an embedded map or is this a restriction of embedded maps? if so is this functionality avail to the javascript api
Is it possible to have a google map embeded street view panorama of a given address in your page?
All the codes I have came across work with coordination, I'm looking for "address", since if you just use coordination you will have to set pov and all that,
Google seems to do that itself, look at the panorama picture here:
http://maps.google.ca/maps/place?hl=en&sugexp=kjrmc&cp=10&gs_id=z&xhr=t&biw=1680&bih=874&gs_upl=&bav=on.2,or.r_gc.r_pw.,cf.osb&um=1&ie=UTF-8&q=toyota+calgary&fb=1&gl=ca&hq=toyota&hnear=0x537170039f843fd5:0x266d3bb1b652b63a,Calgary,+AB&cid=16440335169618939517&ei=VpqYTpPsLbCrsALi0LnqBA&sa=X&oi=local_result&ct=map-marker-link&resnum=1&sqi=2&ved=0CF8QrwswAA
Thanks
Yes, using the Google Maps Javascript API V3. Take a look here: http://code.google.com/apis/maps/documentation/javascript/services.html#StreetView
You can also embed Street View on your page by just using Google Maps.
Search for the address on Google Maps.
Go to the Street View for the location.
Click the link button in the upper-right hand corner above the map.
Click the 'Customize and preview embedded map' link.
A new page will open up with some customization opens and the code to embed the map/image on your page.
Yes you can. All you need is a google decoder who will decode your address. Another way is to directly pass your address as a part of the url to google.
When using decoder, you will get the result in the form of a latitude longitude object which you can use to reset/set your map's marker
There is no way to accurately set the heading automatically and no way to set the pitch and fov (field of view) - BUT if you figure these out manually you can create a URL that fetches a static image with those settings from Google
Take a look at this tutorial on the Street View Image API
How do I embed google street view to my site
I want to show a user location upon visiting my site.
Updated: Is there any clear tutorials or links for Google Maps
You can do it with Google Maps API2
and here is the Google Maps API2 Documention on Street View
Just keep in mind it needs Flash.
update:
and to get the user location, you can use 'The Geolocation API Specification [which] is [a] part of the W3 Consortium’s standards But be warned: it hasn’t been finalized as yet.' consider looking at this question for an example code and more details.
Besides of using the latest Google Maps API version, you Can embed any panoramic view of Google Street View very easily. Being in Google Maps while browsing in Street View, you will find on the left page upper corner the street name and next to the marker a 3 dots vertical line.
You need to click on the 3 dots which are shown next to the street name info and then a form will pop up to give you the option to embed a html iframe with size options on the panoramic view wanted.
I hope it helps.
So I would like to use a URL to retrieve and display ONLY the users CURRENT LOCATION.
For example: A user with a smartphone (iPhone, Android, etc) opens a link [http://maps.google.com/CURRENTLOCATION] on their phone, and it shows their current location on the user's device in either Google Maps app or browser, as reported by their GPS/wireless location. The actual link itself should should remain static, and display the location wherever they are.
Is this possible?
Thanks in advance!
If you have the lat/long coordinates (which I suppose you get through the gps/wireless device), you can use something like this:
http://maps.google.de/maps?q=loc:48.0000,9.000
which opens the Google Maps website with the coordinates N48.0 E9.0 (as decimal coords) centered.
Or, if you need a static map (and not a full fledged JavaScript map), use this link and adjust the values inside the URL:
http://maps.google.com/maps/api/staticmap?center=48.00,9.00&zoom=14&size=512x512&maptype=roadmap&markers=color:blue|48.0,9.0&sensor=true
Valid values for the arguments are:
for maptype: roadmap, terrain, satellite
for zoom: 1 to 20
This is discussed front and center in the Google Maps geolocation API: Detecting the User's Location
According to the documentation, the user will need using an HTML5 equipped browser for this to work. You will need to write the Javascript which looks pretty vanilla.
Edit: This only works if you are using your own domain and have implemented the Maps API (which is really simple), not Google's own maps.google.com