1 | {html_head} |
---|
2 | <script src="http://maps.google.com/maps?file=api&v=2&key={$GMAPS_API_KEY}&hl={$lang_info.code}" type="text/javascript"></script> |
---|
3 | <script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/prototype.js" type="text/javascript"></script> |
---|
4 | <script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/window.js" type="text/javascript" defer="defer"></script> |
---|
5 | <link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/default.css" rel="stylesheet" type="text/css"> |
---|
6 | <link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/alphacube.css" rel="stylesheet" type="text/css"> |
---|
7 | |
---|
8 | <style type="text/css">{literal} |
---|
9 | #mapPicture { |
---|
10 | position:absolute; |
---|
11 | width: 310px; |
---|
12 | } |
---|
13 | |
---|
14 | #map { |
---|
15 | position:relative; |
---|
16 | left: 320px; |
---|
17 | margin-right: 320px; |
---|
18 | height: 512px; |
---|
19 | min-height: 512px; |
---|
20 | } |
---|
21 | |
---|
22 | #thumbPrev, #thumbNext {display:none;} |
---|
23 | {/literal}</style> |
---|
24 | {/html_head} |
---|
25 | |
---|
26 | <div id="mapPicture"> |
---|
27 | <a href="{$U_NO_MAP}" title="{'mode_normal_hint'|@translate}" rel="nofollow"><img src="{$TN_SRC}" alt="thumb"/></a> |
---|
28 | <br/> |
---|
29 | <a href="{$U_BLOWUP}" onclick="return blowupUrl(this.href);">{'More pictures near this location'|@translate}</a> |
---|
30 | <br/> |
---|
31 | {$COMMENT_IMG} |
---|
32 | <br/> |
---|
33 | </div> |
---|
34 | |
---|
35 | <div id="map"></div> |
---|
36 | |
---|
37 | <div style="clear:both"></div> |
---|
38 | <script type="text/javascript">{literal} |
---|
39 | //<![CDATA[ |
---|
40 | function onLoad() |
---|
41 | { |
---|
42 | if (!GBrowserIsCompatible()) |
---|
43 | return; |
---|
44 | |
---|
45 | var mapElement = document.getElementById("map"); |
---|
46 | var map = new GMap2( mapElement ); |
---|
47 | |
---|
48 | map.addControl(new GLargeMapControl()); |
---|
49 | map.addControl(new GMapTypeControl()); |
---|
50 | map.addControl(new GScaleControl()); |
---|
51 | {/literal}{if isset($coordinates)} |
---|
52 | var coord = new GLatLng( {$coordinates.LAT}, {$coordinates.LON} ); |
---|
53 | map.setCenter( coord, 12 ); |
---|
54 | var marker = new GMarker(coord); |
---|
55 | map.addOverlay(marker); |
---|
56 | {/if}{literal} |
---|
57 | if ( !map.isLoaded() ) |
---|
58 | map.setCenter( new GLatLng(0,0), 2); |
---|
59 | try { |
---|
60 | // the overview must be added after setting map center |
---|
61 | var ovcontrol = new GOverviewMapControl(new GSize(165,165)); |
---|
62 | map.addControl(ovcontrol); |
---|
63 | var ov_map = ovcontrol.getOverviewMap(); |
---|
64 | GEvent.addListener(map, 'maptypechanged', function(){ |
---|
65 | ov_map.setMapType(G_NORMAL_MAP); |
---|
66 | }); |
---|
67 | } |
---|
68 | catch(e){ alert( e.message ); } |
---|
69 | |
---|
70 | map.enableDoubleClickZoom(); |
---|
71 | } |
---|
72 | |
---|
73 | function blowupUrl(theUrl) |
---|
74 | { |
---|
75 | var win = new Window({ |
---|
76 | title: document.title, |
---|
77 | url: theUrl, |
---|
78 | classname: "alphacube", |
---|
79 | left: 0, top: 0, |
---|
80 | width:"640", height:"480", |
---|
81 | minimizable: false, |
---|
82 | maximizable: false, |
---|
83 | draggable: false, |
---|
84 | resizable: false, |
---|
85 | destroyOnClose: true, |
---|
86 | hideEffect: Element.hide, |
---|
87 | showEffectOptions: {duration:1.5} |
---|
88 | }); |
---|
89 | |
---|
90 | win.setConstraint(true, {top:20, left:20, bottom:30, right:20} ); |
---|
91 | win.maximize(); |
---|
92 | win.showCenter(true, 20, 20); |
---|
93 | return false; |
---|
94 | } |
---|
95 | |
---|
96 | Event.observe(window, 'load', onLoad ); |
---|
97 | Event.observe(window, 'unload', GUnload ); |
---|
98 | //]]> |
---|
99 | {/literal}</script> |
---|