Changeset 101 for ATGoogleMaps
- Timestamp:
- 08/18/06 00:55:52 (5 years ago)
- Location:
- ATGoogleMaps/trunk/skins/googlemaps
- Files:
-
- 3 edited
-
atgooglemaps.js.dtml (modified) (1 diff)
-
gmap.py (modified) (1 diff)
-
gmap_view.pt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ATGoogleMaps/trunk/skins/googlemaps/atgooglemaps.js.dtml
r79 r101 86 86 } 87 87 88 function addMarker(map, marker_id, lat, lng) {88 function addMarker(map, tabs, marker_id, lat, lng) { 89 89 var point = new GLatLng(lat, lng); 90 90 var marker = new GMarker(point, icon); 91 91 map.addOverlay(marker); 92 var f = function(){ 93 //map.centerAtLatLng(point); 94 marker.openInfoWindowHtml(document.getElementById('marker_html_' + marker_id).innerHTML); 95 }; 92 f = function() {marker.openInfoWindowTabsHtml(tabs)}; 96 93 GEvent.addListener(marker, 'click', f); 97 94 var marker_field = document.getElementById('marker_link_'+ marker_id); -
ATGoogleMaps/trunk/skins/googlemaps/gmap.py
r78 r101 16 16 latitude = marker.point['latitude'] 17 17 longitude = marker.point['longitude'] 18 print " addMarker(map, '%s', %s, %s);" % (marker.id, latitude, longitude) 18 print " var tabs = [" 19 print " new GInfoWindowTab('%s', document.getElementById('marker_html_%s').innerHTML)" % (marker.tab1, marker.id) 20 if marker.detail: 21 print " ,new GInfoWindowTab('%s', document.getElementById('detail_html_%s').innerHTML)" % (marker.tab2, marker.id) 22 print " ];" 23 print " addMarker(map, tabs, '%s', %s, %s);" % (marker.id, latitude, longitude) 19 24 except: 20 25 continue -
ATGoogleMaps/trunk/skins/googlemaps/gmap_view.pt
r82 r101 36 36 37 37 <!-- gmarker --> 38 <ul >39 <tal:gmarker tal:repeat=" marker python: here.objectValues(['GMarker'])">38 <ul tal:define="markers python: here.objectValues(['GMarker'])"> 39 <tal:gmarker tal:repeat="here markers"> 40 40 <li id="" 41 tal:condition=" marker/point | nothing"42 tal:attributes="id string:marker_link_${ marker/id}">43 <a href="javascript:void(0)" onclick="this.blur()" tal:content=" marker/pretty_title_or_id">41 tal:condition="here/point | nothing" 42 tal:attributes="id string:marker_link_${here/id}"> 43 <a href="javascript:void(0)" onclick="this.blur()" tal:content="here/pretty_title_or_id"> 44 44 Gmarker title 45 45 </a> 46 46 <!-- info window --> 47 47 <div id="" style="display: none;" 48 tal:attributes="id string:marker_html_${ marker/id}">48 tal:attributes="id string:marker_html_${here/id}"> 49 49 <div style="width: 290px;"> 50 50 <div class="documentActions"> 51 <a href="" tal:condition=" marker/url"52 tal:attributes="href marker/url"51 <a href="" tal:condition="here/url" 52 tal:attributes="href here/url" 53 53 i18n:translate="" i18n:domain="plone"> 54 54 Link … … 56 56 </div> 57 57 <h1 class="documentFirstHeading"> 58 <a href="" tal:content=" marker/pretty_title_or_id"59 tal:attributes="href marker/absolute_url">58 <a href="" tal:content="here/pretty_title_or_id" 59 tal:attributes="href here/absolute_url"> 60 60 Title or id 61 61 </a> 62 62 </h1> 63 63 <img src="" style="float: left; margin: 5px;" 64 tal:condition=" marker/imageurl"65 tal:attributes="src marker/imageurl" />64 tal:condition="here/imageurl" 65 tal:attributes="src here/imageurl" /> 66 66 67 67 <div class="documentDescription" 68 tal:content=" marker/Description"69 tal:condition=" marker/Description">68 tal:content="here/Description" 69 tal:condition="here/Description"> 70 70 Description 71 71 </div> 72 72 73 73 <div class="address" 74 tal:content=" marker/address"75 tal:condition=" marker/address">74 tal:content="here/address" 75 tal:condition="here/address"> 76 76 address 77 77 </div> 78 78 79 79 <div class="phone" 80 tal:content=" marker/phone"81 tal:condition=" marker/phone">80 tal:content="here/phone" 81 tal:condition="here/phone"> 82 82 phone 83 83 </div> 84 84 85 <div style="clear: both;" tal:condition=" marker/getText"86 tal:content="structure marker/getText">85 <div style="clear: both;" tal:condition="here/getText" 86 tal:content="structure here/getText"> 87 87 Body Text 88 88 </div> 89 89 90 <div metal:use-macro="here/document_relateditems/macros/relatedItems"> 91 show related items if they exist 92 </div> 90 93 </div> 91 94 </div> 95 <div id="" style="display: none;" 96 tal:attributes="id string:detail_html_${here/id}" 97 tal:condition="here/detail"> 98 <div style="width: 290px;"> 99 <div class="documentActions"> 100 <a href="" tal:condition="here/url" 101 tal:attributes="href here/url" 102 i18n:translate="" i18n:domain="plone"> 103 Link 104 </a> 105 </div> 106 <h1 class="documentFirstHeading"> 107 <a href="" tal:content="here/pretty_title_or_id" 108 tal:attributes="href here/absolute_url"> 109 Title or id 110 </a> 111 </h1> 112 <div tal:content="structure here/getDetail"> 113 Detail Text 114 </div> 115 </div> 116 </div> 92 117 </li> 93 118 </tal:gmarker> 94 119 </ul> 95 120 96 <div id="map" style="position: relative; height: 480px;"97 tal:attributes="style string: position: relative;;height: ${here/height}px;;">121 <div id="map" 122 tal:attributes="style string:height: ${here/height}px;;"> 98 123 </div> 124 99 125 <div class="poweredBy"> 100 126 Powered by <a href="http://takanory.net/plone/develop/atgooglemaps">ATGoogleMaps</a>
Note: See TracChangeset
for help on using the changeset viewer.
