Custom Panorama View - Tiles all messed up. At my wit's end for even the simplest code...

134 views
Skip to first unread message

Fadi Bizri

unread,
Aug 6, 2011, 12:48:55 PM8/6/11
to google-map...@googlegroups.com
Hi all,
After reading about Custom Street Views (and watching the cool Google i/o 2011 vid), I wanted to try out building custom high-resolution indoor panorama views using the Street View service.

Thus, after reading the documentation, as well as other online examples, I tried a simple code that uses a 10,000x5,000 pixel panorama image (from which I built a set of 256x256px tiles).

Well it doesn't work. What I see are messed up tiles, and only part of the panorama is accessible.

I must be doing something really dumb to have such a simple code (see: http://riseupsocial.com/customPanorama/) not work.

Any help please?

Notes: the tiles are in the format: tile_z_x-y.png, where z is the zoom level, and x and y are the coordinates.
You can see them at: http://riseupsocial.com/customPanorama/output/

Thanks in advance for any advice.

Fadi

William

unread,
Aug 6, 2011, 7:19:20 PM8/6/11
to Google Maps JavaScript API v3
On Aug 7, 2:48 am, Fadi Bizri <fbi...@gmail.com> wrote:
> tried a simple code that uses a 10,000x5,000 pixel panorama image (from
> which I built a set of 256x256px tiles).

looks like the panorama needs the world size according to the pixel
dimensions at maximum zoom (2048,2048) not the original size of the
panorama (10000,5000)

here's what it looks like with worldSize of (2048,2048)

http://www.william-map.com/20110807/pano.htm

...

William

unread,
Aug 6, 2011, 7:30:38 PM8/6/11
to Google Maps JavaScript API v3
On Aug 7, 9:19 am, William <william.g...@gmail.com> wrote:
>
> here's what it looks like with worldSize of (2048,2048)
>
> http://www.william-map.com/20110807/pano.htm
>

hmmm ... this example looks ok in Chrome but in IE and Firefox it's
distorted in height, with everything twice as tall as it should be.

The documentation says "The StreetViewPanorama object uses images that
conform to the equirectangular (Plate Carrée) projection. Such a
projection contains 360 degrees of horizontal view (a full wrap-
around) and 180 degrees of vertical view (from straight up to straight
down). These fields of view result in an image with an aspect ratio of
2:1"

...

Fadi Bizri

unread,
Aug 7, 2011, 6:00:21 AM8/7/11
to google-map...@googlegroups.com
Hi William,

Many thanks, and yes you're right. For the sake of others reading, what William meant by max pixel size is that, at tile zoom level 3 (the highest I defined when creating the tiles), there are 8 tiles in both x and y dimensions, which means width and height at max zoom is 256*8 = 2048 pixels, and this is the value that should go in the 'worldSize' variable.

As for the distortion, any hints on why FF and IE mess it up? I tried 'mode:html5' and it fixes the distortion, however it messes up the panning smoothness...


Reply all
Reply to author
Forward
0 new messages