of class "nztopo", see http://www.topomap.co.nz/. */ function NZTopo_Parse($p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8) { # global $NZTopoZoom; // Initialise variables $debugon = false; # debug $retval = ''; # return value $opt = ParseArgs($p1 . ' ' . $p2 . ' ' . $p3 . ' ' . $p4 . ' ' . $p5 . ' ' . $p6 . ' ' . $p7 . ' ' . $p8); $version = 2; # fixed version of nztopomap interface $width = $opt['width'] ? ' width="' . $opt['width'] . '"' : ""; # iframe parameter $height = $opt['height'] ? ' height="' . $opt['height'] . '"' : ""; # iframe parameter $float = $opt['float'] ? ' style="float:' . $opt['float'] . ';"' : ""; # iframe parameter // query string parameters $query = ''; $query .= $opt['ll'] ? '&ll=' . $opt['ll'] : ""; $query .= $opt['llbs'] ? '&llbs=' . $opt['llbs'] : ""; $query .= $opt['topo50'] ? '&topo50=' . $opt['topo50'] : ""; $query .= $opt['nzbs'] ? '&nzbs=' . $opt['nzbs'] : ""; $query .= $opt['nzne'] ? '&nzne=' . $opt['nzne'] : ""; $query .= $opt['kml'] ? '&kml=' . rawurlencode($opt['kml']) : ""; $query .= $opt['gpx'] ? '&gpx=' . rawurlencode($opt['gpx']) : ""; $query .= $opt['pin'] ? '&pin=' . $opt['pin'] : ""; $query .= $opt['label'] ? '&lbl=' . rawurlencode(htmlentities($opt['label'])) : ""; # double url encode unicode chars for them to work with the topo map $query .= $opt['zoom'] ? '&z=' . $opt['zoom'] : '&z=' . $NZTopoZoom; $src = 'http://www.topomap.co.nz/NZTopoMapEmbedded?v=' . $version . $query; $retval .= '