add Test page
|
NZ Topo-Boxes
MessagesReplacement version 2023-12-30new
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/.
(:nztopo mapref=BN33991890 pin=1 zoom=11 :)
|
|
(:nztopo mapref="BN33 991890" pin=1 zoom=12:)
|
|
Test label quotation
(:nztopo mapref=BN33991890 pin=1 label='test with "single" quote' caption='test with "single" quote':)
(:nztopo mapref=BN33991890 pin=1 label="test with 'double' quote" caption="test with 'double' quote":)
|
|
Test nzne
(:nztopo nzne=5494000,1811000:)
|
|
(:nztopo nzne=5496000,1811000 zoom=13:)
|
|
Test nzbs
(:nztopo nzbs=5494000,1811000;5488000,1816000:)
|
|
(:nztopo nzbs=5496000,1811000;5493000,1816000 zoom=13:)
|
|
Test llbs
(:nztopo llbs=-41.446072,174.866638;-41.101086,175.334244 zoom=5:)
|
|
Test topo50
(:nztopo topo50=BP33912708,BP33876687:)
| (:nztopo topo50=BP33912708,BP33876687:)
|
(:nztopo topo50=BP33912708,BP33876687 zoom=13:)
| (:nztopo topo50=BP33912708,BP33876687 zoom=13:)
|
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 => 'mapref',
1 => 'BN33991890',
2 => 'pin',
3 => '1',
4 => 'zoom',
5 => '11',
),
'mapref' => 'BN33991890',
'pin' => '1',
'zoom' => '11',
)
opt: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33991890',
2 => 'pin',
3 => '1',
4 => 'zoom',
5 => '11',
),
'mapref' => 'BN33991890',
'pin' => '1',
'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" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&mapref=BN33991890&pin=1&z=11&new=1">
</iframe>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33 991890',
2 => '',
3 => ' ',
4 => 'pin',
5 => '1',
6 => 'zoom',
7 => '12',
),
'mapref' => 'BN33 991890',
'' =>
array (
0 => ' ',
),
'pin' => '1',
'zoom' => '12',
)
opt: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33 991890',
2 => '',
3 => ' ',
4 => 'pin',
5 => '1',
6 => 'zoom',
7 => '12',
),
'mapref' => 'BN33 991890',
'' =>
array (
0 => ' ',
),
'pin' => '1',
'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" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&mapref=BN33 991890&pin=1&z=12&new=1">
</iframe>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33991890',
2 => 'pin',
3 => '1',
4 => 'label',
5 => 'test with "single" quote',
6 => '',
7 => ' ',
8 => 'caption',
9 => 'test with "single" quote',
10 => '',
11 => ' ',
),
'mapref' => 'BN33991890',
'pin' => '1',
'label' => 'test with "single" quote',
'' =>
array (
0 => ' ',
1 => ' ',
),
'caption' => 'test with "single" quote',
)
opt: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33991890',
2 => 'pin',
3 => '1',
4 => 'label',
5 => 'test with "single" quote',
6 => '',
7 => ' ',
8 => 'caption',
9 => 'test with "single" quote',
10 => '',
11 => ' ',
),
'mapref' => 'BN33991890',
'pin' => '1',
'label' => 'test with "single" quote',
'' =>
array (
0 => ' ',
1 => ' ',
),
'caption' => 'test with "single" quote',
)
output: '<:block><figure class="nztopo">
<iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&mapref=BN33991890&pin=1&lbl=test%20with%20%22single%22%20quote&z=13&new=1">
</iframe>
<figcaption>test with "single" quote</figcaption>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33991890',
2 => 'pin',
3 => '1',
4 => 'label',
5 => 'test with \'double\' quote',
6 => '',
7 => ' ',
8 => 'caption',
9 => 'test with \'double\' quote',
10 => '',
11 => ' ',
),
'mapref' => 'BN33991890',
'pin' => '1',
'label' => 'test with \'double\' quote',
'' =>
array (
0 => ' ',
1 => ' ',
),
'caption' => 'test with \'double\' quote',
)
opt: array (
'#' =>
array (
0 => 'mapref',
1 => 'BN33991890',
2 => 'pin',
3 => '1',
4 => 'label',
5 => 'test with \'double\' quote',
6 => '',
7 => ' ',
8 => 'caption',
9 => 'test with \'double\' quote',
10 => '',
11 => ' ',
),
'mapref' => 'BN33991890',
'pin' => '1',
'label' => 'test with \'double\' quote',
'' =>
array (
0 => ' ',
1 => ' ',
),
'caption' => 'test with \'double\' quote',
)
output: '<:block><figure class="nztopo">
<iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&mapref=BN33991890&pin=1&lbl=test%20with%20%27double%27%20quote&z=13&new=1">
</iframe>
<figcaption>test with 'double' quote</figcaption>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'nzne',
1 => '5494000,1811000',
),
'nzne' => '5494000,1811000',
)
opt: array (
'#' =>
array (
0 => 'nzne',
1 => '5494000,1811000',
),
'nzne' => '5494000,1811000',
)
output: '<:block><figure class="nztopo">
<iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&nzne=5494000,1811000&z=13&new=1">
</iframe>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'nzne',
1 => '5496000,1811000',
2 => 'zoom',
3 => '13',
),
'nzne' => '5496000,1811000',
'zoom' => '13',
)
opt: array (
'#' =>
array (
0 => 'nzne',
1 => '5496000,1811000',
2 => 'zoom',
3 => '13',
),
'nzne' => '5496000,1811000',
'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" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&nzne=5496000,1811000&z=13&new=1">
</iframe>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'nzbs',
1 => '5494000,1811000;5488000,1816000',
),
'nzbs' => '5494000,1811000;5488000,1816000',
)
nzbskm: 'nthsests="5494000", "1811000", "5488000", "1816000</br />
ests="1811000", "1816000</br />
nths="5494000", "5488000</br />
minest=1811000, maxest=1816000, minnth=5488000, maxnth=5494000</br />
w1=5, h1=6, w=5km, h=6km'
opt: array (
'#' =>
array (
0 => 'nzbs',
1 => '5494000,1811000;5488000,1816000',
),
'nzbs' => '5494000,1811000;5488000,1816000',
)
output: '<:block><figure class="nztopo">
<iframe class="nztopoframe" title="Display NZ Topo map" loading="lazy" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="400" height="480" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&nzbs=5494000,1811000;5488000,1816000&new=1">
</iframe>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'nzbs',
1 => '5496000,1811000;5493000,1816000',
2 => 'zoom',
3 => '13',
),
'nzbs' => '5496000,1811000;5493000,1816000',
'zoom' => '13',
)
nzbskm: 'nthsests="5496000", "1811000", "5493000", "1816000</br />
ests="1811000", "1816000</br />
nths="5496000", "5493000</br />
minest=1811000, maxest=1816000, minnth=5493000, maxnth=5496000</br />
w1=5, h1=3, w=5km, h=3km'
opt: array (
'#' =>
array (
0 => 'nzbs',
1 => '5496000,1811000;5493000,1816000',
2 => 'zoom',
3 => '13',
),
'nzbs' => '5496000,1811000;5493000,1816000',
'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="400" height="400" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&nzbs=5496000,1811000;5493000,1816000&new=1">
</iframe>
</figure>
'
NZToponew\NZTopo_Parse: array (
'#' =>
array (
0 => 'llbs',
1 => '-41.446072,174.866638;-41.101086,175.334244',
2 => 'zoom',
3 => '5',
),
'llbs' => '-41.446072,174.866638;-41.101086,175.334244',
'zoom' => '5',
)
llbskm: 'lats="array (
0 => '-41.446072',
1 => '-41.101086',
)</br />
lngs="174.866638", "175.334244</br />
minlat=-41.446072, maxlat=-41.101086, minlng=174.866638, maxlng=175.334244</br />
w1=39.19219775431, w2=38.985620017919, h1=38.371512954807, h2=38.371512954807, w=39.2km, h=38.4km'
opt: array (
'#' =>
array (
0 => 'llbs',
1 => '-41.446072,174.866638;-41.101086,175.334244',
2 => 'zoom',
3 => '5',
),
'llbs' => '-41.446072,174.866638;-41.101086,175.334244',
'zoom' => '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="3136" height="3136" src="https://www.topomap.co.nz/NZTopoMapEmbedded?v=2&llbs=-41.446072,174.866638;-41.101086,175.334244&new=1">
</iframe>
</figure>
'
|