Widget:Google Street View: Unterschied zwischen den Versionen

Aus Hist. Verein Herne / Wanne-Eickel
Inhalt gelöscht Inhalt hinzugefügt
KKeine Bearbeitungszusammenfassung
Markierung: Zurückgesetzt
änd
 
(27 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 2: Zeile 2:
This widget allows you to add '''[http://maps.google.com/help/maps/streetview/ Google Street View]''' widget to your wiki page.
This widget allows you to add '''[http://maps.google.com/help/maps/streetview/ Google Street View]''' widget to your wiki page.


Created by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev]
It was created by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev] in 2011 and updated by [https://professional.wiki Karsten Hoffmeyer] for [https://www.pro.wiki ProWiki] in 2023.


== Using this widget ==
== Using this widget ==
Zeile 8: Zeile 8:


<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>
<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>
|lat=40.758153
|lat=52.520008
|lng=-73.985355
|lng=13.404954
|heading=180
|yaw=370.64659986187695
|pitch=-20
|pitch=10
|zoom=0
|fov=100
}}</nowiki>
}}</nowiki>


Zeile 18: Zeile 18:
* '''lat''' - lattitude of street view location
* '''lat''' - lattitude of street view location
* '''lng''' - longitude of street view location
* '''lng''' - longitude of street view location
* '''height''' and '''width''' define view dimensions. Defaults: width=420; height=350
* '''height''' and '''width''' define view dimensions. Defaults: width=600; height=450
* '''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)
* '''heading''' - defines the horizontal angle between the camera's line of sight and the North direction, with 0 degrees pointing North. Values between 0 and 360 are permissible. Examples:
**"0" degrees (default): The camera faces North.
* '''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). And for some reason, for static maps, this value must be negated, e.g. negative values look down and positive look up (don't ask me why the discrepancy).
**"90" degrees: The camera faces East.
* '''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. Works '''only for interactive''' street views - for static use '''fov''' parameter instead.
**"180" degrees: The camera faces South.
* '''fov''' - field of view, similar to zoom, but expressed in degrees for a field of view, default is 90 and maximum is 120. Works '''only for static''' street views - for interactive use '''zoom''' parameter instead.
**"270" degrees: The camera faces West.
* '''static''' - if present, indicates that static image should be inserted instead of an interactive map. '''Note:''' some differences between static and interactive maps:
* '''pitch''' - defines the angle variance "up" or "down" from the camera's initial default pitch, allowing you to control whether the camera looks up, straight ahead, or down. Values between -90 and 90 are permissible. Examples:
** use '''fov''' parameter instead of '''zoom'''
**"0" degrees (default): The camera looks straight ahead, parallel to the ground.
** make sure that you revert the value of '''pitch''' as negative values point down for static street views
**"45" degrees: The camera tilts upward, showing higher parts of the scene.
** positioning does not necessarily match on the two - converting from interactive to static will give close enough position, but not perfect, manual correction might be required
**"-45" degrees: The camera tilts downward, displaying lower parts of the scene.

* '''fov''' - defines the field of view or the extent of the scene the camera can capture in a single view. It determines how wide or narrow the camera's perspective is. Values between 30 and 120 are permissible but may not work in all cases. Examples:

**"30" degrees: A narrow field focusing on a specific area or object.
== Copy to your site ==
**"90" degrees (default): A moderate field of view, capturing a balanced view of the surroundings.
To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
**"120" degrees: A wide field of view, providing a broad scene perspective.
</noinclude><includeonly><!--{if isset($static)}--><img src="http://maps.googleapis.com/maps/api/streetview?size=<!--{$width|escape:'urlpathinfo'|default:'420'}-->x<!--{$height|escape:'urlpathinfo'|default:350}-->&location=<!--{$lat|escape:'urlpathinfo'}-->,%20<!--{$lng|escape:'urlpathinfo'}-->&fov=<!--{$fov|escape:'urlpathinfo'|default:90}-->&heading=<!--{$yaw|escape:'urlpathinfo'|default:0}-->&pitch=<!--{$pitch|escape:'urlpathinfo'|default:0}-->&sensor=false" width="<!--{$width|escape:'html'|default:'420'}-->" height="<!--{$height|escape:'html'|default:350}-->"/><!--{else}--><!--{counter assign="panoDivID" name="panoDivID"}--><!--{if $panoDivID eq 1}--><script type="text/javascript" src="http://www.google.com/jsapi?key=AIzaSyChFaHzxYLPfHrUW7fyxPQ7PXSsArOxoYU"></script><!--{/if}-->
</noinclude><includeonly><iframe
<script type="text/javascript">
width="<!--{$width|validate:int|escape:html|default:'600'}-->"
google.load("maps", "2.s");
height="<!--{$height|validate:int|escape:html|default:'450'}-->"
google.setOnLoadCallback(function()
src="https://www.google.com/maps/embed/v1/streetview?key=AIzaSyC5R86btT-DazqkCZzCwBgG4D3zWny3Em8
{
&location=<!--{$lat|validate:float|escape:url|default:'52.520008'}-->,<!--{$lng|validate:float|escape:url|default:'13.404954'}-->
var myPano = new GStreetviewPanorama(document.getElementById("pano<!--{$panoDivID|escape:'html'}-->"),
&heading=<!--{$heading|validate:int|escape:url|default:'0'}-->
{
latlng: new GLatLng('<!--{$lat|escape:'quotes'}-->', '<!--{$lng|escape:'quotes'}-->'),
&pitch=<!--{$pitch|validate:int|escape:url|default:'0'}-->
&fov=<!--{$fov|validate:int|escape:url|default:'90'}-->"
pov: {
sandbox="allow-scripts allow-same-origin allow-fullscreen"
yaw:Number('<!--{$yaw|escape:'quotes'|default:0}-->'),
loading="lazy"
pitch:Number('<!--{$pitch|escape:'quotes'|default:0}-->'),
allowfullscreen
zoom:Number('<!--{$zoom|escape:'quotes'|default:0}-->')
referrerpolicy="no-referrer-when-downgrade"
}
style="border: 0;"
});
></iframe></includeonly>
});
</script>
<div id="pano<!--{$panoDivID|escape:'html'}-->" style="width: <!--{$width|escape:'html'|default:'420'}-->px; height: <!--{$height|escape:'html'|default:350}-->px"></div><!--{/if}--></includeonly>

Aktuelle Version vom 2. Februar 2025, 19:57 Uhr

This widget allows you to add Google Street View widget to your wiki page.

It was created by Sergey Chernyshev in 2011 and updated by Karsten Hoffmeyer for ProWiki in 2023.

Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.

{{#widget:Google Street View
|lat=52.520008
|lng=13.404954
|heading=180
|pitch=10
|fov=100
}}

Parameters

  • lat - lattitude of street view location
  • lng - longitude of street view location
  • height and width define view dimensions. Defaults: width=600; height=450
  • heading - defines the horizontal angle between the camera's line of sight and the North direction, with 0 degrees pointing North. Values between 0 and 360 are permissible. Examples:
    • "0" degrees (default): The camera faces North.
    • "90" degrees: The camera faces East.
    • "180" degrees: The camera faces South.
    • "270" degrees: The camera faces West.
  • pitch - defines the angle variance "up" or "down" from the camera's initial default pitch, allowing you to control whether the camera looks up, straight ahead, or down. Values between -90 and 90 are permissible. Examples:
    • "0" degrees (default): The camera looks straight ahead, parallel to the ground.
    • "45" degrees: The camera tilts upward, showing higher parts of the scene.
    • "-45" degrees: The camera tilts downward, displaying lower parts of the scene.
  • fov - defines the field of view or the extent of the scene the camera can capture in a single view. It determines how wide or narrow the camera's perspective is. Values between 30 and 120 are permissible but may not work in all cases. Examples:
    • "30" degrees: A narrow field focusing on a specific area or object.
    • "90" degrees (default): A moderate field of view, capturing a balanced view of the surroundings.
    • "120" degrees: A wide field of view, providing a broad scene perspective.