Ero sivun ”Widget:Google Street View” versioiden välillä

WirmoWikistä
Siirry navigaatioonSiirry hakuun
(Ak: Uusi sivu: <noinclude>__NOTOC__ 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.mediawi...)
 
Ei muokkausyhteenvetoa
 
(19 välissä olevaa versiota samalta käyttäjältä ei näytetä)
Rivi 1: Rivi 1:
<noinclude>__NOTOC__
<noinclude>__NOTOC__
This widget allows you to add '''[http://maps.google.com/help/maps/streetview/ Google Street View]''' widget to your wiki page.
This widget lets 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. JaH / Sivutuuli updated script 2026-02-03.


== Using this widget ==
== Using this widget ==
For information on how to use this widget, see [http://www.mediawikiwidgets.org/Google_Street_View widget description page on MediaWikiWidgets.org].
For information on how to use this widget, see [https://www.mediawikiwidgets.org/Google_Street_View widget description page on MediaWikiWidgets.org].


== Copy to your site ==
== Copy to your site ==
To use this widget on your site, just install [http://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.
To use this widget on your site, install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''.
</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=<!--{$key|escape:'urlpathinfo'}-->"></script><!--{/if}-->
 
<script type="text/javascript">
== Requirement ==
google.load("maps", "2.s");
For this widget to work, you must obtain an API key from Google Maps. See the [https://developers.google.com/maps/documentation/streetview/get-api-key?hl=en documentation on Street View Static API] on how to obtain one. Once retrieved, you must replace <code>YOUR_API_KEY</code> in the copied code on your wiki with your API key.
google.setOnLoadCallback(function()
</noinclude><includeonly><img
{
    width="<!--{$width|validate:int|escape:html|default:'600'}-->"
var myPano = new GStreetviewPanorama(document.getElementById("pano<!--{$panoDivID|escape:'html'}-->"),
    height="<!--{$height|validate:int|escape:html|default:'450'}-->"
{
    src="https://maps.googleapis.com/maps/api/streetview?size=<!--{$width|validate:int|escape:html|default:'600'}-->x<!--{$height|validate:int|escape:html|default:'450'}-->&key=AIzaSyBBMeBjqjGnZYVp0TbpbhXS8ShcOfIs4Uw&location=<!--{$lat|validate:float|escape:url|default:'52.520008'}-->,<!--{$lng|validate:float|escape:url|default:'13.404954'}-->
latlng: new GLatLng('<!--{$lat|escape:'quotes'}-->', '<!--{$lng|escape:'quotes'}-->'),
&heading=<!--{$heading|validate:int|escape:url|default:'0'}-->
pov: {
&pitch=<!--{$pitch|validate:int|escape:url|default:'0'}-->
yaw:Number('<!--{$yaw|escape:'quotes'|default:0}-->'),
&fov=<!--{$fov|validate:int|escape:url|default:'90'}-->"
pitch:Number('<!--{$pitch|escape:'quotes'|default:0}-->'),
    sandbox="allow-scripts allow-same-origin allow-fullscreen"
zoom:Number('<!--{$zoom|escape:'quotes'|default:0}-->')
    loading="lazy"
}
    allowfullscreen
});
    referrerpolicy="no-referrer-when-downgrade"
});
    style="border: 0;"
</script>
></includeonly>
<div id="pano<!--{$panoDivID|escape:'html'}-->" style="width: <!--{$width|escape:'html'|default:'420'}-->px; height: <!--{$height|escape:'html'|default:350}-->px"></div><!--{/if}--></includeonly>

Nykyinen versio 4. helmikuuta 2026 kello 11.52

This widget lets 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. JaH / Sivutuuli updated script 2026-02-03.

Using this widget

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

Copy to your site

To use this widget on your site, install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Google Street View.

Requirement

For this widget to work, you must obtain an API key from Google Maps. See the documentation on Street View Static API on how to obtain one. Once retrieved, you must replace YOUR_API_KEY in the copied code on your wiki with your API key.