Skip to content
Permalink
Browse files

* put javascript in front of html-code to please internet explorer (h…

…ope this helps)

* fixed loading of previous map type
* added function to center on home coordinates
* removed "street view" mode
  • Loading branch information...
flopp committed Oct 28, 2012
1 parent 8cd3226 commit 9b1f1be67d4da16581d6ffaeb9f02b2b42adf2b2
Showing with 610 additions and 551 deletions.
  1. +15 −3 htdocs/map2.php
  2. +14 −2 htdocs/map2full.php
  3. +288 −271 htdocs/templates2/ocstyle/map2.tpl
  4. +293 −275 htdocs/templates2/ocstyle/map2full.tpl
@@ -1,12 +1,13 @@
<?php
/***************************************************************************
* For license information see doc/license.txt
* You can find the license in the docs directory
*
* Unicode Reminder メモ
***************************************************************************/
require('./lib2/web.inc.php');
require_once('./lib2/logic/cache.class.php');
require_once('./lib2/logic/user.class.php');
require_once('./lib2/logic/attribute.class.php');
/* because the map does access some private info like
@@ -65,7 +66,7 @@
$tpl->error($translate->t('There is no google maps key registered for this domain.', '', '', 0));
//$tpl->add_header_javascript('https://maps.googleapis.com/maps/api/js?key=' . urlencode($sGMKey) . '&amp;sensor=false');
$tpl->add_header_javascript('https://maps.googleapis.com/maps/api/js?sensor=false');
$tpl->add_header_javascript('https://maps.googleapis.com/maps/api/js?sensor=false&key=' . urlencode($sGMKey));
$tpl->add_header_javascript('resource2/misc/map/CacheMarker.js');
$tpl->add_body_load('mapLoad()');
$tpl->add_body_unload('GUnload()');
@@ -122,7 +123,18 @@
$sGMInitWaypoint = '';
}
}
$nUserLon = 0;
$nUserLat = 0;
if( $login->userid != 0 )
{
$user = new user($login->userid);
$nUserLat = $user->getLatitude();
$nUserLon = $user->getLongitude();
}
$tpl->assign('nUserLon', $nUserLon);
$tpl->assign('nUserLat', $nUserLat);
$tpl->assign('nGMInitLon', $nGMInitLon);
$tpl->assign('nGMInitLat', $nGMInitLat);
$tpl->assign('nGMInitZoom', $nGMInitZoom);
@@ -7,6 +7,7 @@
require('./lib2/web.inc.php');
require_once('./lib2/logic/cache.class.php');
require_once('./lib2/logic/user.class.php');
require_once('./lib2/logic/attribute.class.php');
/* because the map does access some private info like
@@ -65,7 +66,7 @@
$tpl->error($translate->t('There is no google maps key registered for this domain.', '', '', 0));
//$tpl->add_header_javascript('https://maps.googleapis.com/maps/api/js?key=' . urlencode($sGMKey) . '&amp;sensor=false');
$tpl->add_header_javascript('https://maps.googleapis.com/maps/api/js?sensor=false');
$tpl->add_header_javascript('https://maps.googleapis.com/maps/api/js?sensor=false&key=' . urlencode($sGMKey));
$tpl->add_header_javascript('resource2/misc/map/CacheMarker.js');
$tpl->add_body_load('mapLoad()');
$tpl->add_body_unload('GUnload()');
@@ -122,7 +123,18 @@
$sGMInitWaypoint = '';
}
}
$nUserLon = 0;
$nUserLat = 0;
if( $login->userid != 0 )
{
$user = new user($login->userid);
$nUserLat = $user->getLatitude();
$nUserLon = $user->getLongitude();
}
$tpl->assign('nUserLon', $nUserLon);
$tpl->assign('nUserLat', $nUserLat);
$tpl->assign('nGMInitLon', $nGMInitLon);
$tpl->assign('nGMInitLat', $nGMInitLat);
$tpl->assign('nGMInitZoom', $nGMInitZoom);
Oops, something went wrong.

0 comments on commit 9b1f1be

Please sign in to comment.
You can’t perform that action at this time.