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

Last change on this file since 12706 was 12706, checked in by rvelices, 12 years ago

rv_gmaps use places autocomplete + added new markers + better algo for displaying markers

  • Property svn:eol-style set to LF
File size: 1.9 KB
Line 
1
2{html_head}
3<script src="http://maps.google<script src="http://maps.googleapis.com/maps/api/js?sensor=false&amp;language={$lang_info.code}" type="text/javascript"></script>
4{combine_script id='jquery' load='header' path='themes/default/js/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 photos 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[
40jQuery(document).ready( function () {
41        var mapElement = document.getElementById("map");
42        var mapOpts = {
43{/literal}{if isset($coordinates)}
44                center: new google.maps.LatLng( {$coordinates.LAT}, {$coordinates.LON} ),
45                zoom : 12,
46{else}
47                center: new google.maps.LatLng(0,0),
48                zoom : 1,
49{/if}{literal}
50                mapTypeId: google.maps.MapTypeId.ROADMAP
51        };
52       
53        var map = new google.maps.Map( mapElement, mapOpts );
54
55{/literal}{if isset($coordinates)}
56        var marker = new google.maps.Marker( {ldelim}
57                position: map.getCenter(),
58                map: map
59                });
60{/if}{literal}
61}
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
75//]]>
76{/literal}</script>
Note: See TracBrowser for help on using the repository browser.