Commit 2e3a499c authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Enhancement: Allow map to be embedded in iFrames

This will be refined over time and available to all user if enabled,
but for now a quick addition to allow the map to be shown on sbarc.org
again.
parent e8947ee9
......@@ -223,7 +223,7 @@ The meshmap.css file will be used in place of the -default.css file.<br/>
- [x] Change the user editable files to be distributed with &ldquo;-default&rdquo; added to the extension, no more tar.gz file.<br/>
- [x] Use a cookie instead of _POST for the internet check (No more stupid dialog box on refresh).<br/>
- [ ] Make &ldquo;Parallel Threads&rdquo; work again in get-map-info script, with limits on how many can be run at once (this will greatly speed up network polling).<br/>
- [ ] Changes so sbarc.org can have the new version too!<br/>
- [x] Changes so sbarc.org can have the new version too!<br/>
- [ ] Change css file for the &ldquo;?&rdquo; slide-out menu.<br/>
- [x] Fix a typo in the attribution bar so the pop-up for the links is only for the links number.<br/>
- [ ] Implement N2MH&rsquo;s &ldquo;Link aging&rdquo; idea(s).<br/>
......
......@@ -179,7 +179,7 @@ The meshmap.css file will be used in place of the -default.css file.
- [x] Change the user editable files to be distributed with "-default" added to the extension, no more tar.gz file.
- [x] Use a cookie instead of _POST for the internet check (No more stupid dialog box on refresh).
- [ ] Make "Parallel Threads" work again in get-map-info script, with limits on how many can be run at once (this will greatly speed up network polling).
- [ ] Changes so sbarc.org can have the new version too!
- [x] Changes so sbarc.org can have the new version too!
- [ ] Change css file for the "?" slide-out menu.
- [x] Fix a typo in the attribution bar so the pop-up for the links is only for the links number.
- [ ] Implement N2MH's "Link aging" idea(s).
......
......@@ -1048,7 +1048,12 @@ function show_MapMarkerDetails($numNodes, $numLinks, $numMarkers, $numNodesTotal
$numLinksTotal . " Total links in the database." . '\n' . "Nodes without Location info cannot have links shown.\">" .
$numLinks . "</a> links " . "&nbsp;|&nbsp;Data Last Acquired @ " . $filetime . "</strong>';\n";
$Content .= "WXCAttribution = 'Map originally created by <a href=mailto:kg6wxc@gmail.com>KG6WXC</a> Oct 2016&nbsp;with N2MH and K6GSE contributions&nbsp;|&nbsp;';\n";
$Content .= "WXCAttribution = '<a href=mailto:kg6wxc@gmail.com title=\'" .
"MeshMap version 2.5" . '\n\n' .
"Map originally created by:" . '\n' .
"KG6WXC in Oct 2016" .'\n' .
"With later contributions from:" . '\n' .
"N2MH and K6GSE\'>KG6WXC</a>&nbsp;|&nbsp;';\n";
$Content .= "MapAttribution = '<a href=http://leafletjs.com title=\'" .
"Map data &copy; by OpenStreetMap (http://openstreetmap.org) with contributions from:" . '\n' .
......
......@@ -348,33 +348,27 @@ echo "<body>\n";
//GSE: [Removed] if ($_SERVER['HTTP_HOST'] == $USER_SETTINGS['meshServerHostName'] || $_SERVER['HTTP_HOST'] ==
// "kg6wxc-host.local.mesh"
//)
if (isset($USER_SETTINGS['map_iFrame_Enabled']) && ($USER_SETTINGS['map_iFrame_Enabled']))
{
if (isset($USER_SETTINGS['map_iFrame_Enabled']) && ($USER_SETTINGS['map_iFrame_Enabled'])) {
echo "<div id='meshmap'>\n"; // Closing tag at end of primary routine
echo "<div id='mapid'>\n";
echo "</div>\n";
}
else
{
if(isset($GLOBALS['map_div_embedded'])) {
echo $GLOBALS['map_div_embedded'];
}else {
echo "<div id='mapid'></div>\n";
}
}else {
echo "<div id='meshmap'>\n"; // Closing tag at end of primary routine
if (isset($USER_SETTINGS['pageLogo']))
{
if (isset($USER_SETTINGS['pageLogo'])) {
echo "<MapTitle>";
// echo "<img id='logo' src='" . $USER_SETTINGS['pageLogo'] .
// "' alt='Map or Club Logo' width='50' style='vertical-align: middle;'>";
echo "<img id='pageLogo' src='" . $USER_SETTINGS['pageLogo'] .
"' alt='The Logo'>";
echo "<img id='pageLogo' src='" . $USER_SETTINGS['pageLogo'] . "' alt='The Logo'>";
echo "</MapTitle>\n";
}
if (isset($USER_SETTINGS['logoHeaderText']))
{
if (isset($USER_SETTINGS['logoHeaderText'])) {
echo "<MapTitle>";
echo $USER_SETTINGS['logoHeaderText'];
echo "</MapTitle>\n";
echo "<br>";
}
if (isset($USER_SETTINGS['welcomeMessage']))
{
if (isset($USER_SETTINGS['welcomeMessage'])) {
echo "<Welcome_MSG>";
echo $USER_SETTINGS['welcomeMessage'];
//echo "<br>";
......@@ -387,8 +381,7 @@ else
echo "</Welcome_MSG2>\n";
echo "<br>";
}
if (isset($USER_SETTINGS['meshWarning']) && $mesh)
{
if (isset($USER_SETTINGS['meshWarning']) && $mesh) {
echo "<Warning_MSG>";
echo $USER_SETTINGS['meshWarning'];
echo "</Warning_MSG>";
......@@ -396,17 +389,6 @@ else
}
}
/*
if (isset($GLOBALS['no_req_msg'])) {
if ($GLOBALS['no_req_msg'] == "1") {
//output nothing!!
}
}else {
echo "<strong><a style=\"color: inherit;text-decoration: none;\" href=\"\" title=\"" .
$GLOBALS['USER_SETTINGS']['where_is_my_node'] . "\">Where the heck is my node??</a>\n";
}
*/
if (isset($GLOBALS['hide_admin'])) {
if ($GLOBALS['hide_admin'] == "1") {
//output nothing!!
......@@ -415,7 +397,9 @@ if (isset($GLOBALS['hide_admin'])) {
echo "<strong><a style=\"float: right;\" href=\"admin/admin.php\">Admin</a></strong>\n";
}
echo "<div id='mapid'></div>\n";
if (isset($USER_SETTINGS['map_iFrame_Enabled']) && !($USER_SETTINGS['map_iFrame_Enabled'])) {
echo "<div id='mapid'></div>\n";
}
//$numNodes = count($NodeList); // WXC change: this was giving the wrong number.
//should not count nodes that have no location info, they are not on the map...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment