没处藏身撩——用Google街景地图找到你
作者: 赵博 • 2008 年 9 月 7 日 • 技术主义 • 暂无评论
where can I hide myself in this google world? Google Street View digs you out whereever you are.Google Street View provides panoramic 360 degree views from designated roads throughout the coverage area for Google Maps.Use of the Street View Panorama object requires support for the Flash plugin on the client’s browser.How to use this component? just follow the steps below,
- Create a container (usually a <div> element) to hold the Street View Flash? viewer.
- Create a GStreetviewPanorama object and place it within the container.
- Initialize the Street View object to refer to a specific location and display an initial “point of view” (POV).
- Handle unsupported browsers by checking for the 603 error value.
And then, google street view uses a view system named POV(Street View Points of View), which defines the placement of the camera locus for an image, but it does not define the orientation of the camera for that image. For that purpose, the GPov object literal defines three properties:
- yaw defines the rotation angle around the camera locus in degrees relative from true north. Yaw angles are measured clockwise (90 degrees is true east).
- pitch defines the angle variance “up” or “down” from the camera’s initial default pitch, which is often (but not always) flat horizontal. (For example, an image taken on a hill will likely exhibit a default pitch that is not horizontal.) Pitch angles are measured with negative values looking up (to -90 degrees straight up and orthogonal to the default pitch) and positive values looking down (to +90 degrees straight down and orthogonal to the default pitch).
- zoom defines the zoom level of this view (effectively proscribing the “field of view”) with 0 being fully zoomed-out. Different Street View locations may provide higher or lower zoom levels.
By default, these values are all 0 and define a flat horizontal view directly north with the widest possible field of view.
I use Street View to display where I am. to access the streetview , goto http://plaza.ufl.edu/bo/where.htm. and here is the code below,
var myPano = new GStreetviewPanorama(document.getElementById("pano")); spanishtrace = new GLatLng(29.647343, -82.341644); myPOV = {yaw:345,pitch:-10}; myPano.setLocationAndPOV(spanishtrace, myPOV); GEvent.addListener(myPano, "error", handleNoFlash); } function handleNoFlash(errorCode) { if (errorCode == 603) { alert("Error: Flash doesn't appear to be supported by your browser"); return; }
相关文章:
