source: extensions/rv_gmaps/trunk/template/picture_map_content.tpl @ 6670

Last change on this file since 6670 was 6670, checked in by rvelices, 14 years ago

rv_gmaps picture page uses google maps api v3

  • Property svn:eol-style set to LF
File size: 2.4 KB
Line 
1{html_head}
2<script src="http://maps.google.com/maps/api/js?sensor=false&amp;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="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"></script>
5<script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/window.js" type="text/javascript" defer="defer"></script>
6<link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/default.css" rel="stylesheet" type="text/css">
7<link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/alphacube.css" rel="stylesheet" type="text/css">
8
9<style type="text/css">{literal}
10#mapPicture {
11        position:absolute;
12        width: 310px;
13}
14
15#map {
16        position:relative;
17        left: 320px;
18        margin-right: 320px;
19        height: 512px;
20        min-height: 512px;
21}
22
23#thumbPrev, #thumbNext {display:none;}
24{/literal}</style>
25{/html_head}
26
27<div id="mapPicture">
28<a href="{$U_NO_MAP}" title="{'return to normal view mode'|@translate}" rel="nofollow"><img src="{$TN_SRC}" alt="thumb"/></a>
29<br/>
30<a href="{$U_BLOWUP}" onclick="return blowupUrl(this.href);">{'More pictures near this location'|@translate}</a>
31<br/>
32{$COMMENT_IMG}
33<br/>
34</div>
35
36<div id="map"></div>
37
38<div style="clear:both"></div>
39<script type="text/javascript">{literal}
40//<![CDATA[
41function onLoad()
42{
43        var mapElement = document.getElementById("map");
44        var mapOpts = {
45{/literal}{if isset($coordinates)}
46                center: new google.maps.LatLng( {$coordinates.LAT}, {$coordinates.LON} ),
47                zoom : 12,
48{else}
49                center: new google.maps.LatLng(0,0),
50                zoom : 1,
51{/if}{literal}
52                mapTypeId: google.maps.MapTypeId.ROADMAP
53        };
54       
55        var map = new google.maps.Map( mapElement, mapOpts );
56
57{/literal}{if isset($coordinates)}
58        var marker = new google.maps.Marker( {ldelim}
59                position: map.getCenter(),
60                map: map
61                });
62{/if}{literal}
63}
64
65function blowupUrl(theUrl)
66{
67        var win = new Window({
68                title: document.title,
69                url: theUrl,
70                classname: "alphacube",
71                left: 0, top: 0,
72                width:"640", height:"480",
73                minimizable: false,
74                maximizable: false,
75                draggable: false,
76                resizable: false,
77                destroyOnClose: true,
78                hideEffect: Element.hide,
79                showEffectOptions: {duration:1.5}
80        });
81
82        win.setConstraint(true, {top:20, left:20, bottom:30, right:20} );
83        win.maximize();
84        win.showCenter(true, 20, 20);
85        return false;
86}
87
88Event.observe(window, 'load', onLoad );
89//]]>
90{/literal}</script>
Note: See TracBrowser for help on using the repository browser.