namespace('acme.maps.photomarker');acme.maps.photomarker.Initialize=function() {acme.maps.photomarker.PhotoMarker.prototype=new google.maps.Overlay();acme.maps.photomarker.PhotoMarker.prototype.initialize=function(map) {this.map=map;var me=this;this.markerDiv=acme.utils.AppendElement(map.getPane(google.maps.MAP_MARKER_PANE),'div',{title:this.title,style:{position:'absolute'}});if(this.markerImage) {this.markerImg=acme.utils.AppendElement(this.markerDiv,'img',{src:this.markerImage,style:{position:'absolute',zIndex:'0',width:this.markerSize.width+'px',height:this.markerSize.height+'px',cursor:'pointer'}});GEvent.addDomListener(this.markerImg,"click",function(event){GEvent.trigger(me,"click");});} if(this.photoImage) {this.photoImg=acme.utils.AppendElement(this.markerDiv,'img',{src:this.photoImage,style:{position:'absolute',zIndex:'1',width:this.photoSize.width+'px',height:this.photoSize.height+'px',left:this.photoOffset.x+'px',top:this.photoOffset.y+'px',cursor:'pointer'}});GEvent.addDomListener(this.photoImg,"click",function(event){GEvent.trigger(me,"click");});} if(this.shadowImage) this.shadowImg=acme.utils.AppendElement(map.getPane(google.maps.MAP_MARKER_SHADOW_PANE),'img',{src:this.shadowImage,style:{position:'absolute',width:this.shadowSize.width+'px',height:this.shadowSize.height+'px'}});this.targetDiv=acme.utils.AppendElement(map.getPane(google.maps.MAP_MARKER_MOUSE_TARGET_PANE),'div',{title:this.title,style:{position:'absolute',width:this.markerSize.width+'px',height:this.markerSize.height+'px',cursor:'pointer'}});GEvent.addDomListener(this.targetDiv,"click",function(event){GEvent.trigger(me,"click");});};acme.maps.photomarker.PhotoMarker.prototype.remove=function() {this.markerDiv.parentNode.removeChild(this.markerDiv);if(this.shadowImg) this.shadowImg.parentNode.removeChild(this.shadowImg);this.targetDiv.parentNode.removeChild(this.targetDiv);};acme.maps.photomarker.PhotoMarker.prototype.copy=function() {return new acme.maps.photomarker.PhotoMarker(this.latLng,this.markerImage,this.markerSize,this.markerOffset,this.photoImage,this.photoSize,this.photoOffset,this.shadowImage,this.shadowSize,this.shadowOffset);};acme.maps.photomarker.PhotoMarker.prototype.redraw=function(force) {if(!force) return;var divPixel=this.map.fromLatLngToDivPixel(this.latLng);var zIndex=Math.floor(this.latLng.lat()*-1000000);this.markerDiv.style.left=(divPixel.x-this.markerOffset.x)+'px' this.markerDiv.style.top=(divPixel.y-this.markerSize.height-this.markerOffset.y)+'px';this.markerDiv.style.zIndex=zIndex;if(this.shadowImg) {this.shadowImg.style.left=(divPixel.x-this.shadowOffset.x)+'px' this.shadowImg.style.top=(divPixel.y-this.shadowSize.height-this.shadowOffset.y)+'px';this.shadowImg.style.zIndex=zIndex;} this.targetDiv.style.left=(divPixel.x-this.markerOffset.x)+'px' this.targetDiv.style.top=(divPixel.y-this.markerSize.height-this.markerOffset.y)+'px';this.targetDiv.style.zIndex=zIndex;};acme.maps.photomarker.PhotoMarker.prototype.getKml=function(callback) {callback(null);} acme.maps.photomarker.PhotoMarker.prototype.getLatLng=function() {return this.latLng;};acme.maps.photomarker.PhotoMarker.prototype.setLatLng=function(latLng) {this.latLng=latLng;};acme.maps.photomarker.PhotoMarker.prototype.getTitle=function() {return this.title;};acme.maps.photomarker.PhotoMarker.prototype.setTitle=function(title) {this.title=title;if(this.markerDiv) this.markerDiv.title=title;};};acme.maps.photomarker.PhotoMarker=function(latLng,markerImage,markerSize,markerOffset,photoImage,photoSize,photoOffset,shadowImage,shadowSize,shadowOffset) {this.latLng=latLng;this.markerImage=markerImage;this.markerSize=markerSize;this.markerOffset=markerOffset;this.photoImage=photoImage;this.photoSize=photoSize;this.photoOffset=photoOffset;this.shadowImage=shadowImage;this.shadowSize=shadowSize;this.shadowOffset=shadowOffset;};