Changeset 1234
- Timestamp:
- 10/09/10 12:11:00 (3 years ago)
- Location:
- g-map/files/js/gmap
- Files:
-
- 2 modified
-
AjaxMap.class.js (modified) (2 diffs)
-
ClusterMarker.class.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
g-map/files/js/gmap/AjaxMap.class.js
r1233 r1234 16 16 17 17 /** 18 * called in content GMarker or ClusterMarker18 * 19 19 */ 20 this.fireClickEvent = function() { 21 alert(this.getLatLng()); 20 this.fireClickEvent = function(marker) { 21 marker.openInfoWindowHtml(marker.getLatLng() + "\nzoom: " + this.gmap.getZoom()); 22 // start ajax request for ClusterMarker here 22 23 }; 23 24 … … 53 54 } 54 55 55 GEvent.addListener(marker, "click", map.fireClickEvent); 56 GEvent.addListener(marker, "click", function(map, marker) { 57 return function() { 58 map.fireClickEvent(marker); 59 }; 60 }(map, marker)); 56 61 map.gmap.addOverlay(marker); 57 62 } -
g-map/files/js/gmap/ClusterMarker.class.js
r1233 r1234 48 48 this.getLatLng = function() { 49 49 return this.latlng_; 50 } 50 }; 51 52 this.openInfoWindowHtml = function(html) { 53 var window = this.map_.getInfoWindow(); 54 window.reset(this.getLatLng(), [new GInfoWindowTab("", html)]); 55 window.show(); 56 }; 51 57 } 52 58
