Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web site where I need to generate link to Google Maps in Street View mode. I have available the coordinates to generate the URL.

When I try this URL in a desktop browser, it does what I want, and takes me to a street in Norway, and activating street view:,0.022767&ctz=-60&t=h&z=16&layer=c&cbll=58.819625,5.75462&cbp=12,44.85,,0,18.41

When I try exaclty the same URL in a mobile browser, it just ignores the parameters, and redirects to . When I try another link that is not streetview, it works.

I noticed it first in an iPad, and then tried in a Samsung Galaxy using Firefox, and same there.

I even tried using Firefox on desktop using the mobile device emulator plugin emulating an iPad, and same there. So it is Google that does this if the user agent reports itself as a mobile device.

Then I tried to navigate to a specific location in Google Maps on the mobile device, and clicked on the street view icon. Then a new window was opened with this URL:,247.65935203825757,,0,0

This works for this location, but I need to generate the URL based on coordinates, so I don't have a valid panoid to use. Is panoid the only way to use url parameters for displaying street view on mobile device? If so, is there any API available for generating a panoid based on coordinates?

share|improve this question
up vote 2 down vote accepted

For Mobile Devices (that don't support normal web browsing option)

You will need to find the PanID by Lat/Lng

This is possible and here is an example of it:

Official (via the API) the url is,5.75462&heading=250&fov=90&pitch=-10&sensor=false gets the actual image not metadata

This still works to get the metadata,5.75462,5.75462

returns in xml:

    <panorama><data_properties image_width="13312" image_height="6656" tile_width="512" tile_height="512" image_date="2010-08" pano_id="_dexjqha6c6zUEQ1PQeaFw" num_zoom_levels="3" lat="58.819625" lng="5.754620" original_lat="58.819646" original_lng="5.754602"><copyright>© 2012 Google</copyright><text>Kruneli</text><region>Sandnes, Rogaland</region><country>Norway</country></data_properties><projection_properties projection_type="spherical" pano_yaw_deg="214.6" tilt_yaw_deg="-104.6" tilt_pitch_deg="5.97"/><annotation_properties><link yaw_deg="32.12" pano_id="I8DY9jG5FZhsGpxYsL1VJA" road_argb="0x80ffffff" scene="0"><link_text>Krunehagen / Kruneli / Krunemyr</link_text></link><link yaw_deg="211.83" pano_id="f8cBtSWUvOwFcupKJNrYMw" road_argb="0x80ffffff" scene="0"><link_text>Kruneli</link_text></link></annotation_properties></panorama>

You can then use this information in a script to gain the location of each PanID streeview image of for the mobile device.

For reference:

share|improve this answer
This worked just fine. See my answer for details on how I implemented it. By the way, is this official Google method of doing this, or is it just an "undocumented feature" that Google has made for own use? – awe Jan 11 '13 at 11:55
Offical Streetview API (released October 2012) – Mapperz Jan 11 '13 at 15:06
update the accepted answer with some more reference material. – Mapperz Jan 11 '13 at 15:13

Based on the answer by @Mapperz, I came up with the following solution:

function openStreetview(lat,lon){
  var dataUrl = '' + lat + ',' + lon + '&';
    url: dataUrl,
    dataType: 'jsonp',
    data: {}
    .done(function (data) {
      if(data && data.Location && data.Location.panoId){
        var url = ',,,,30&panoid=' + data.Location.panoId;, '_self');
      } else {
        alert('Street View could not allocate position.');
    .fail(function (jqXHR, textStatus, errorThrown) {
      alert('Street View - fail() \n textStatus: ' + textStatus + '\n errorThrown: ' + errorThrown);
share|improve this answer
This looks like a good solution - Well done , you are good programmer (I am not)... – Mapperz Jan 11 '13 at 14:59
@Mapperz: And you are good at GIS (Ref. your high rep. here on GIS.SE)... We can't be good at everything. Good thing we can combine knowledge to end up with good solutions! – awe Jan 14 '13 at 6:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.