Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix function name embedding, adding some unused coordinates

  • Loading branch information...
commit ee341a421b6b819885a46cf4fbb35bf520fad49f 1 parent e33320e
gabor authored
13 bin/xml
@@ -15,6 +15,19 @@ my %ids;
15 15
16 16 $| = 1;
17 17
  18 +
  19 +my %map_coordinates = (
  20 + africa => [20, 0, 8],
  21 + asia => [95, 45, 8],
  22 + central_america => [9, 10, 8],
  23 + europe => [15.029297, 49.61071, 8],
  24 + north_america => [10, 10, 8],
  25 + oceania => [134.296875, -25.641526, 8],
  26 + south_america => [-63.63, -25.00, 8],
  27 +);
  28 +
  29 +
  30 +
18 31 my $tt = Template->new({
19 32 PRE_PROCESS => [ 'lib/macros' ],
20 33 POST_CHOMP => 1,
4 lib/layout
@@ -17,7 +17,9 @@
17 17 title="basic" />
18 18 <link rel="shortcut icon" href="/groups/favicon.ico">
19 19 <!-- This key good for http://www.pm.org/groups -->
20   - <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>
  20 + <script type="text/javascript"
  21 + src="http://maps.google.com/maps?file=api&amp;v=1&amp;key=ABQIAAAAjrB1EtK9LGPa_E4v8BqfIhTlJQKl_2NMosGPJ4kJAF_u_Vcv4hQ6A7lpErcC3Q23mBu5eRPQ_SGvBA&amp;sensor=false">
  22 + </script>
21 23
22 24 <script type="text/javascript" src="/groups/map.js"></script>
23 25 </head>
4 src/groups/continent.html
... ... @@ -1,7 +1,7 @@
1 1 [%
2 2 WRAPPER layout title = "Perl Mongers: $continent"
3   - onload="initialize()"
4   - onunload="GUnload()"
  3 + onload="initialize"
  4 + onunload="GUnload"
5 5 %]
6 6
7 7 <script type="text/javascript">
4 src/groups/country.html
... ... @@ -1,7 +1,7 @@
1 1 [%
2 2 WRAPPER layout title = "Perl Mongers: $continent"
3   - onload="initialize()"
4   - onunload="GUnload()"
  3 + onload="initialize"
  4 + onunload="GUnload"
5 5 %]
6 6
7 7 <script type="text/javascript">
4 src/groups/group.html
... ... @@ -1,8 +1,8 @@
1 1 [% title = name _ " (" _ location _ ") Perl Mongers" | html_entity;
2 2 subtitle = name;
3 3 WRAPPER layout title = title
4   - onload="initialize()"
5   - onunload="GUnload()"
  4 + onload="initialize"
  5 + onunload="GUnload"
6 6 %]
7 7
8 8 <script type="text/javascript">
31 src/groups/map.js
@@ -7,6 +7,8 @@ var asia = new GPoint(95, 45);
7 7 var africa = new GPoint(20, 0);
8 8 var sa = new GPoint(-63.63, -25.00);
9 9
  10 +
  11 +
10 12 var map;
11 13 function onLoad() {
12 14 // Center the map
@@ -75,17 +77,24 @@ function initialize() {
75 77 max: coords[0][1],
76 78 min: coords[0][1],
77 79 }
78   - for(i = 1; i < coords.length; i++) {
79   - latitude['min'] = Math.min(coords[i][0], latitude['min']);
80   - latitude['max'] = Math.max(coords[i][0], latitude['max']);
81   - longitude['min'] = Math.min(coords[i][1], longitude['min']);
82   - longitude['max'] = Math.max(coords[i][1], longitude['max']);
83   - }
84   - //var zoom = 13; // TODO should be calculated?
85   - //alert(longitude['min'] + " " + longitude['max']);
86   - //alert(latitude['min'] + " " + latitude['max']);
87   - longitude['center'] = (longitude['max'] + longitude['min'])/2;
88   - latitude['center'] = (latitude['max'] + latitude['min'])/2;
  80 +// if (map_coordinates[file_name]) {
  81 +// longitude['center'] = map_coordinates[file_name][0];
  82 +// latitude['center'] = map_coordinates[file_name][1];
  83 +// zoom = map_coordinates[file_name][2];
  84 +// } else {
  85 +// for(i = 1; i < coords.length; i++) {
  86 +// latitude['min'] = Math.min(coords[i][0], latitude['min']);
  87 +// latitude['max'] = Math.max(coords[i][0], latitude['max']);
  88 +// longitude['min'] = Math.min(coords[i][1], longitude['min']);
  89 +// longitude['max'] = Math.max(coords[i][1], longitude['max']);
  90 +// }
  91 +
  92 + //var zoom = 13; // TODO should be calculated?
  93 + //alert(longitude['min'] + " " + longitude['max']);
  94 + //alert(latitude['min'] + " " + latitude['max']);
  95 + longitude['center'] = (longitude['max'] + longitude['min'])/2;
  96 + latitude['center'] = (latitude['max'] + latitude['min'])/2;
  97 +// }
89 98
90 99 if (GBrowserIsCompatible()) {
91 100 var map = new GMap2(document.getElementById("map-canvas"));

0 comments on commit ee341a4

Please sign in to comment.
Something went wrong with that request. Please try again.