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

Last change on this file since 23083 was 23083, checked in by rvelices, 11 years ago

rv_gmaps:

  • admin can choose default map type (roadmap, satellite, ...)
  • auto center and zoom when viewing map for the entire gallery
  • fix kml namespace
  • attempt to fix uage with https on the photo page (need test)
  • Property svn:eol-style set to LF
File size: 1.8 KB
Line 
1{html_head}
2<script src="//maps.googleapis.com/maps/api/js?sensor=false&amp;language={$lang_info.code}" type="text/javascript"></script>
3{combine_script id='jquery' load='header' path='themes/default/js/jquery.min.js'}
4{combine_script id='jquery.colorbox' load='async' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
5{combine_css path='themes/default/js/plugins/colorbox/style2/colorbox.css'}
6{/html_head}{html_style}{literal}
7#mapPicture {
8        position:absolute;
9        width: 310px;
10}
11
12#map {
13        position:relative;
14        left: 320px;
15        margin-right: 320px;
16        height: 512px;
17        min-height: 512px;
18}
19
20#linkPrev, #linkNext {display:none}
21{/literal}{/html_style}
22
23<div id="mapPicture">
24<a href="{$U_NO_MAP}" title="{'return to normal view mode'|@translate}" rel="nofollow"><img src="{$current.THUMB_SRC}" alt="thumb"></a>
25<br/>
26<a href="{$U_BLOWUP}" onclick="return blowupUrl(this.href);">{'More photos near this location'|@translate}</a>
27<br/>
28{$COMMENT_IMG}
29<br/>
30</div>
31
32<div id="map"></div>
33
34<div style="clear:both"></div>
35<script type="text/javascript">{literal}
36//<![CDATA[
37jQuery(document).ready( function () {
38        var mapElement = document.getElementById("map");
39        var mapOpts = {
40{/literal}{if isset($coordinates)}
41                center: new google.maps.LatLng( {$coordinates.LAT}, {$coordinates.LON} ),
42                zoom : 12,
43{else}
44                center: new google.maps.LatLng(0,0),
45                zoom : 1,
46{/if}{literal}
47                mapTypeId: google.maps.MapTypeId.{/literal}{$MAP_TYPE}{literal}
48        };
49       
50        var map = new google.maps.Map( mapElement, mapOpts );
51
52{/literal}{if isset($coordinates)}
53        var marker = new google.maps.Marker( {ldelim}
54                position: map.getCenter(),
55                map: map
56                });
57{/if}{literal}
58}
59);
60
61function blowupUrl(theUrl)
62{
63        jQuery.colorbox({href: theUrl, iframe: 1, width: "99%", height: "99%"});
64        return false;
65}
66
67//]]>
68{/literal}</script>
Note: See TracBrowser for help on using the repository browser.