Template:Repeater: Difference between revisions

From ponti
Jump to navigation Jump to search
No edit summary
No edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 4: Line 4:
Edit the page to see the template text.
Edit the page to see the template text.
</noinclude><includeonly>
</noinclude><includeonly>
<html><script>
window.cb = function cb(json) {
    //do what you want with the json
    document.getElementById('output').innerHTML = json.address.road + ',' + json.address.city;
}
window.search = function search() {
    var s = document.createElement('script');     
    s.src = 'http://nominatim.openstreetmap.org/reverse?json_callback=cb&format=json&lat=-23.56320001&lon=-46.66140002&zoom=27&addressdetails=1';
    document.getElementsByTagName('head')[0].appendChild(s);
};
</script>
<button onclick="search();" name="search">search</button>
<p id="output"></p>
</html>
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 33: Line 15:
| [[URL::{{{URL|}}}]]
| [[URL::{{{URL|}}}]]
|-
|-
! Location
| [[Location::{{{Location}}}]], [[Province::{{{Province}}}]], [[Country::{{{Country}}}]]
|-
! Coordinates
! Coordinates
| [[Coordinates::{{{Coordinates}}}]]
| [[Coordinates::{{{Coordinates}}}]]
|-
|-
! Locator
! Locator
| [[Locator::{{{Locator}}}]]
| id="locator" |{{#coordinates:location={{{Coordinates}}}|format=dd|directional=no}}
|-
! Address
| id="address" |{{#coordinates:location={{{Coordinates}}}|format=dd|directional=no}}
|-
|-
! Altitude
! Altitude

Latest revision as of 16:55, 3 December 2014

This is the 'Repeater' template.

Edit the page to see the template text.