001 package com.google.gwt.maps.client.streetview;
002
003 import com.google.gwt.core.client.JavaScriptObject;
004 import com.google.gwt.maps.client.base.Size;
005
006 /**
007 * The properties of the tile set used in a Street View panorama.
008 * <br><br>
009 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#StreetViewTileData">StreetViewTileData API Doc</a>
010 */
011 public class StreetViewTileData extends JavaScriptObject {
012
013 /**
014 * The properties of the tile set used in a Street View panorama.
015 * use newInstance();
016 */
017 protected StreetViewTileData() {}
018
019 /**
020 * creates The properties of the tile set used in a Street View panorama.
021 */
022 public final static StreetViewTileData newInstance() {
023 return JavaScriptObject.createObject().cast();
024 }
025
026 /**
027 * Gets the tile image URL for the specified tile.
028 * @param pano is the panorama ID of the Street View tile.
029 * @param zoom is the zoom level of the tile.
030 * @param tileX is the x-coordinate of the tile.
031 * @param tileY is the y-coordinate of the tile.
032 * @param handler
033 */
034 public final native String getTileUrl(String pano, int zoom, int tileX, int tileY, TileUrlHandler handler) /*-{
035 this.getTileUrl = function(pano, zoom, tileX, tileY) {
036 return @com.google.gwt.maps.client.streetview.StreetViewTileData::getTileUrlImpl(Ljava/lang/String;IIILcom/google/gwt/maps/client/streetview/TileUrlHandler;)(pano, zoom, tileX, tileY, handler);
037 };
038 }-*/;
039
040 private final static String getTileUrlImpl(String pano, int zoom, int tileX, int tileY, TileUrlHandler handler) {
041 return handler.getTileUrl(pano, zoom, tileX, tileY);
042 }
043
044 /**
045 * sets The heading (in degrees) at the center of the panoramic tiles.
046 * @param centerHeading
047 */
048 public final native void setCenterHeading(int centerHeading) /*-{
049 this.centerHeading = centerHeading;
050 }-*/;
051
052 /**
053 * gets The heading (in degrees) at the center of the panoramic tiles.
054 */
055 public final native int getCenterHeading() /*-{
056 return this.centerHeading;
057 }-*/;
058
059 /**
060 * sets The size (in pixels) at which tiles will be rendered. This may not be the native tile image size.
061 * @param tileSize
062 */
063 public final native void setTileSize(Size tileSize) /*-{
064 this.tileSize = tileSize;
065 }-*/;
066
067 /**
068 * gets The size (in pixels) at which tiles will be rendered. This may not be the native tile image size.
069 */
070 public final native Size getTileSize() /*-{
071 return this.tileSize;
072 }-*/;
073
074 /**
075 * sets The size (in pixels) of the whole panorama's "world".
076 * @param worldSize
077 */
078 public final native void setWorldSize(Size worldSize) /*-{
079 this.worldSize = worldSize;
080 }-*/;
081
082 /**
083 * gets The size (in pixels) of the whole panorama's "world".
084 */
085 public final native Size getWorldSize() /*-{
086 return this.worldSize;
087 }-*/;
088
089 }