Recent Changes - Search:

add Test page

hide

Test


hide

Topics

show

Changed

Visitor's book Site map pmwiki-2.3.32

NZ Topo-Zoom

MessagesReplacement version 2023-12-30new DebugMessages version 2024-01-14

Testing the Cookbook:NZTopo recipe, see NZTopo


NZTopo version 2023-01-22new

Tests use the development version of NZTopo - NZToponew

See Cookbook.nztopo, Cookbook:/nztopo, https://kiwiwiki.nz/pmwiki/pmwiki.php/Cookbook/NZTopoAPI, and https://www.topomap.co.nz/.

Test zoom 5 to 15

width=600 height=600

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=5 {$:size} caption="Mākaro Island with zoom at 5" :)

Mākaro Island with zoom at 5

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=6 {$:size} caption="Mākaro Island with zoom at 6" :)

Mākaro Island with zoom at 6

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=7 {$:size} :)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=8 {$:size} :)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=9  {$:size} :)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=10 {$:size} :)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=11 {$:size}:)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=12 {$:size} :)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=13 {$:size}:)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=14 {$:size}:)

(:nztopo ll=-41.293722,174.871482 pin=1 label='Makaro' zoom=15 {$:size} :)

Messages

nztoponew


D:\Home\KiwiWiki\pmwiki\cookbook\nztoponew.php
: '2023-01-22new'

markup: '/\(:nztopo\s+?((?:ll=[+-]?\d{1,2}[.]\d+[,][+-]?[1]?\d{1,2}[.]\d+)|(?:llbs=[+-]?\d{1,2}[.]\d+[,][+-]?[1]?\d{1,2}[.]\d+(?:[;][+-]?\d{1,2}[.]\d+[,][+-]?[1]?\d{1,2}[.]\d+)+)|(?:kml=(?:(?<q1>\'|\")(?:https?:\/\/.*)\k<q1>|(?<q2>\'|\"|)(?:(?:[-~,[:alnum:]\x80-\xfe]+(?:\.|\/)){0,2}[-\w\.\, !=\+\#\x80-\xfe]+\.kml)\k<q2>|https?:\/\/[^\s]*))|(?:gpx=(?:(?<q6>\'|\"|)(?:(?:[-~,[:alnum:]\x80-\xfe]+(?:\.|\/)){0,2}[-\w\.\, !=\+\#\x80-\xfe]+\.gpx)\k<q6>|(?<q7>\'|\")(?:https?:\/\/.*)\k<q7>|https?:\/\/[^\s]*))|(?:nzne=\d{7}(?:[.]\d{0,3})?[,]\d{7}(?:[.]\d{0,3})?)|(?:nzbs=\d{7}(?:[.]\d{0,3})?[,]\d{7}(?:[.]\d{0,3})?(?:[;]\d{7}(?:[.]\d{0,3})?[,]\d{7}(?:[.]\d{0,3})?)+)|(?:mapref=(?<q8>\'|\"|)(?:[ABC][A-Z][0-4]\d[ ]?\d{6})\k<q8>)|(?:kml2=(?:(?<q3>\'|\")(?:https?:\/\/.*)\k<q3>|https?:\/\/[^\s]*))|(?:kml3=(?:(?<q4>\'|\")(?:https?:\/\/.*)\k<q4>|https?:\/\/[^\s]*))|(?:kml4=(?:(?<q5>\'|\")(?:https?:\/\/.*)\k<q5>|https?:\/\/[^\s]*)))\s*?(?:(height=\d{1,5}(?:px)?)\s*|(width=\d{1,5}(?:px)?)\s*|(pin=[01])\s*|(label=(?<q9>\'|\")(?:.+?)\k<q9>)\s*|(zoom=\d{1,2})\s*|(float=(?:left|right))\s*|(clear=(?:left|right|both))\s*){0,7}\s*?(?:(caption=(?<q10>\'|\")(?:.+?)\k<q10>)\s*){0,1}\s*?:\)/i'

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '5',
    14 => 'caption',
    15 => 'Mākaro Island with zoom at 5',
    16 => '',
    17 => ' ',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
    1 => ' ',
  ),
  'zoom' => '5',
  'caption' => 'Mākaro Island with zoom at 5',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '5',
    14 => 'caption',
    15 => 'Mākaro Island with zoom at 5',
    16 => '',
    17 => ' ',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
    1 => ' ',
  ),
  'zoom' => '5',
  'caption' => 'Mākaro Island with zoom at 5',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=5&new=1"> </iframe> <figcaption>Mākaro Island with zoom at 5</figcaption> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '6',
    14 => 'caption',
    15 => 'Mākaro Island with zoom at 6',
    16 => '',
    17 => ' ',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
    1 => ' ',
  ),
  'zoom' => '6',
  'caption' => 'Mākaro Island with zoom at 6',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '6',
    14 => 'caption',
    15 => 'Mākaro Island with zoom at 6',
    16 => '',
    17 => ' ',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
    1 => ' ',
  ),
  'zoom' => '6',
  'caption' => 'Mākaro Island with zoom at 6',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=6&new=1"> </iframe> <figcaption>Mākaro Island with zoom at 6</figcaption> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '7',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '7',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '7',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '7',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=7&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '8',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '8',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '8',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '8',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=8&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '9',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '9',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '9',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '9',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=9&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '10',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '10',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '10',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '10',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=10&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '11',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '11',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '11',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '11',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=11&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '12',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '12',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '12',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '12',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=12&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '13',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '13',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '13',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '13',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=13&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '14',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '14',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '14',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '14',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=14&new=1"> </iframe> </figure> '

NZToponew\NZTopo_Parse
:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '15',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '15',
)

opt:
array (
  '#' => 
  array (
    0 => 'll',
    1 => '-41.293722,174.871482',
    2 => 'height',
    3 => '600',
    4 => 'width',
    5 => '600',
    6 => 'pin',
    7 => '1',
    8 => 'label',
    9 => 'Makaro',
    10 => '',
    11 => ' ',
    12 => 'zoom',
    13 => '15',
  ),
  'll' => '-41.293722,174.871482',
  'height' => '600',
  'width' => '600',
  'pin' => '1',
  'label' => 'Makaro',
  '' => 
  array (
    0 => ' ',
  ),
  'zoom' => '15',
)

output: '<:block><figure class="nztopo"> <iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="600" height="600" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&ll=-41.293722,174.871482&pin=1&lbl=Makaro&z=15&new=1"> </iframe> </figure> '

tahi Page last modified on 2022 Dec 04 04:57

Edit - History - Recent Changes - WikiHelp - Search - ?Subject="KiwiWiki: NZ Topo-Zoom"&Body="From KiwiWiki: NZ Topo-Zoom (https://kiwiwiki [period] nz/Test/NZTopo-Zoom) - Testing the Cookbook:NZTopo recipe, see [[Cookbook/NZTopo" | email page as link ]]