Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix function name embedding, adding some unused coordinates

  • Loading branch information...
commit ee341a421b6b819885a46cf4fbb35bf520fad49f 1 parent e33320e
gabor authored
13 bin/xml
View
@@ -15,6 +15,19 @@ my %ids;
$| = 1;
+
+my %map_coordinates = (
+ africa => [20, 0, 8],
+ asia => [95, 45, 8],
+ central_america => [9, 10, 8],
+ europe => [15.029297, 49.61071, 8],
+ north_america => [10, 10, 8],
+ oceania => [134.296875, -25.641526, 8],
+ south_america => [-63.63, -25.00, 8],
+);
+
+
+
my $tt = Template->new({
PRE_PROCESS => [ 'lib/macros' ],
POST_CHOMP => 1,
4 lib/layout
View
@@ -17,7 +17,9 @@
title="basic" />
<link rel="shortcut icon" href="/groups/favicon.ico">
<!-- This key good for http://www.pm.org/groups -->
- <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=1&amp;key=ABQIAAAAjrB1EtK9LGPa_E4v8BqfIhTlJQKl_2NMosGPJ4kJAF_u_Vcv4hQ6A7lpErcC3Q23mBu5eRPQ_SGvBA&amp;sensor=false"></script>
+ <script type="text/javascript"
+ src="http://maps.google.com/maps?file=api&amp;v=1&amp;key=ABQIAAAAjrB1EtK9LGPa_E4v8BqfIhTlJQKl_2NMosGPJ4kJAF_u_Vcv4hQ6A7lpErcC3Q23mBu5eRPQ_SGvBA&amp;sensor=false">
+ </script>
<script type="text/javascript" src="/groups/map.js"></script>
</head>
4 src/groups/continent.html
View
@@ -1,7 +1,7 @@
[%
WRAPPER layout title = "Perl Mongers: $continent"
- onload="initialize()"
- onunload="GUnload()"
+ onload="initialize"
+ onunload="GUnload"
%]
<script type="text/javascript">
4 src/groups/country.html
View
@@ -1,7 +1,7 @@
[%
WRAPPER layout title = "Perl Mongers: $continent"
- onload="initialize()"
- onunload="GUnload()"
+ onload="initialize"
+ onunload="GUnload"
%]
<script type="text/javascript">
4 src/groups/group.html
View
@@ -1,8 +1,8 @@
[% title = name _ " (" _ location _ ") Perl Mongers" | html_entity;
subtitle = name;
WRAPPER layout title = title
- onload="initialize()"
- onunload="GUnload()"
+ onload="initialize"
+ onunload="GUnload"
%]
<script type="text/javascript">
31 src/groups/map.js
View
@@ -7,6 +7,8 @@ var asia = new GPoint(95, 45);
var africa = new GPoint(20, 0);
var sa = new GPoint(-63.63, -25.00);
+
+
var map;
function onLoad() {
// Center the map
@@ -75,17 +77,24 @@ function initialize() {
max: coords[0][1],
min: coords[0][1],
}
- for(i = 1; i < coords.length; i++) {
- latitude['min'] = Math.min(coords[i][0], latitude['min']);
- latitude['max'] = Math.max(coords[i][0], latitude['max']);
- longitude['min'] = Math.min(coords[i][1], longitude['min']);
- longitude['max'] = Math.max(coords[i][1], longitude['max']);
- }
- //var zoom = 13; // TODO should be calculated?
- //alert(longitude['min'] + " " + longitude['max']);
- //alert(latitude['min'] + " " + latitude['max']);
- longitude['center'] = (longitude['max'] + longitude['min'])/2;
- latitude['center'] = (latitude['max'] + latitude['min'])/2;
+// if (map_coordinates[file_name]) {
+// longitude['center'] = map_coordinates[file_name][0];
+// latitude['center'] = map_coordinates[file_name][1];
+// zoom = map_coordinates[file_name][2];
+// } else {
+// for(i = 1; i < coords.length; i++) {
+// latitude['min'] = Math.min(coords[i][0], latitude['min']);
+// latitude['max'] = Math.max(coords[i][0], latitude['max']);
+// longitude['min'] = Math.min(coords[i][1], longitude['min']);
+// longitude['max'] = Math.max(coords[i][1], longitude['max']);
+// }
+
+ //var zoom = 13; // TODO should be calculated?
+ //alert(longitude['min'] + " " + longitude['max']);
+ //alert(latitude['min'] + " " + latitude['max']);
+ longitude['center'] = (longitude['max'] + longitude['min'])/2;
+ latitude['center'] = (latitude['max'] + latitude['min'])/2;
+// }
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map-canvas"));
Please sign in to comment.
Something went wrong with that request. Please try again.