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

Last change on this file since 8304 was 8304, checked in by rvelices, 13 years ago

rv_gmaps co;patible with piwigo trunk (future 2.2)

  • Property svn:eol-style set to LF
File size: 1.9 KB
Line 
1
2{html_head}
3<script src="http://maps.google.com/maps/api/js?sensor=false&amp;hl={$lang_info.code}" type="text/javascript"></script>
4{combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'}
5{combine_script id='jquery.nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}
6<link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.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="{'return to normal view mode'|@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[
40function onLoad()
41{
42        var mapElement = document.getElementById("map");
43        var mapOpts = {
44{/literal}{if isset($coordinates)}
45                center: new google.maps.LatLng( {$coordinates.LAT}, {$coordinates.LON} ),
46                zoom : 12,
47{else}
48                center: new google.maps.LatLng(0,0),
49                zoom : 1,
50{/if}{literal}
51                mapTypeId: google.maps.MapTypeId.ROADMAP
52        };
53       
54        var map = new google.maps.Map( mapElement, mapOpts );
55
56{/literal}{if isset($coordinates)}
57        var marker = new google.maps.Marker( {ldelim}
58                position: map.getCenter(),
59                map: map
60                });
61{/if}{literal}
62}
63
64function blowupUrl(theUrl)
65{
66        jQuery.fx.off = true;
67        jQuery.nyroModalManual( {
68                url: theUrl,
69                forceType: 'iframe',
70                width: 1920
71        });
72        return false;
73}
74
75jQuery(document).ready( onLoad );
76//]]>
77{/literal}</script>
Note: See TracBrowser for help on using the repository browser.