Javascript MarkerWithLabel.js:缩放后标签将换行

Javascript MarkerWithLabel.js:缩放后标签将换行,javascript,css,google-maps-api-3,Javascript,Css,Google Maps Api 3,我在我的应用程序中使用带有MarkerWithLabel插件的Google地图API。它看起来与该示例中的类似: //MarkerWithLabel库: 函数继承(e,t){function i(){}i.prototype=t.prototype,e.superClass=t.prototype,e.prototype=new i,e.prototype.constructor=e},this.eventDiv_u=document.createElement(“div”),this.eve

我在我的应用程序中使用带有MarkerWithLabel插件的Google地图API。它看起来与该示例中的类似:

//MarkerWithLabel库:
函数继承(e,t){function i(){}i.prototype=t.prototype,e.superClass=t.prototype,e.prototype=new i,e.prototype.constructor=e},this.eventDiv_u=document.createElement(“div”),this.eventDiv_u=style.cssText=this.labelDiv_=style.cssText,this.eventDiv_=setAttribute(“onselectstart”,“return false;”),this.crossDiv_=MarkerLabel_54; getSharedCross(t)}函数MarkerWithLabel(e){e=124e},e.labelContent=e.labelContent |,e.LabelACHOR=e.LabelACHOR |{},e.LabelBackground=e.labelVisible&(e.labelVisible=!0),e.labelStyle=e.labelStyle |{},e.LabelBackground=e.LabelBackground | | |!1,“未定义”==e.labelVisible的类型和(e.labelVisible=!0),“未定义”==e.RaiseOn的类型拖动和(e.raiseOnDrag=!点击“=!未定义的类型),“未定义的类型”=!未定义的”==typeof e.draggable&&(e.draggable=!1),“未定义”==typeof e.optimized&&(e.optimized=!1),e.crossImage=e.crossImage | |“http”+(“https:==document.location.protocol?”s:“+”://maps.gstatic.com/intl/en_us/mapfiles/drag_cross 67_16.png),e.handCursor=e.handCursor | http+(“https:==document.location.location.protocol?”)+“://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur”,e.optimized=!1,this.label=new MarkerLabel(this,e.crossImage,e.handCursor),google.maps.Marker.apply(this,arguments)}inherits(MarkerLabel,google.maps.overyview),MarkerLabel\getSharedCross=function(e){)var t;return“undefined”==typeof MarkerLabel\getSharedCross.getSharedCross.crossDiv&&(t=document.createElement(“img”),t.style.cssText=“position:absolute;z-index:1000002;display:none;”,t.style.marginLeft=“-8px”,t.style.marginTop=“-9px”,t.src=e,MarkerLabel_2;getSharedCross.crossDiv=t),MarkerLabel_2;.getSharedCross.crossDiv},MarkerLabel_2;.prototype.onAdd=function(){变量e,t,t,t,i,i,s,a,r,o,n=this,l=,l=,l=,g=,g=,g=20(“+this.handCursorURL_+”,h=函数(e){e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.StopRopagation&&e.StopRopagation(),v=函数(){n.marker_U2;setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv),this.getPanes().overlayMouseTarget.appendChild(this.eventDiv),“未定义”==typeof MarkerLabel.getSharedCross.processed&(this.getPanes().overlayImage.appendChild(this.crossDiv),MarkerLabel.getSharedCross.processed=!0),this.listeners.=[google.maps.event.addDomListener(this.eventDiv_,“mouseover”,function(e){(n.marker| getDragable()| n.marker| getClickable())&(this.style.cursor=“pointer”,google.maps.event.trigger(n.marker_,“mouseover”,e))),google.maps.event.adddomstener(this.eventDiv_,“mouseout”,function(e){!n.marker_.getDraggable()&!n.marker_.getClickable()| g | | |(this.style.cursor=n.marker_.getCursor(),google.maps.event.trigger(n.marker,“mouseout”,e)),google.maps{g=!1,n.marker_.getDraggable()&(l=!0,this.style.cursor=),(n.marker_.getDraggable()| n.marker_.getClickable())&(google.maps.event.trigger(n.marker_,“mousedown”,e),h(e)),google.maps.event.adddomstener(文档,“mouseup”,函数(t){i;if(l=!1,n.eventDiv_.style.cursor=”,google.maps.event.trigger,“mouseup”,if,{.marker,a),if({){i=n.getProjection().fromLatLngToDivPixel(n.marker_u.getPosition()),i.y+=p,n.marker_uu.setPosition(n.getProjection().fromDivPixelToLatLng(i));尝试{n.marker_OdivPixel.setAnimation(google.maps.Animation.BOUNCE),setTimeout(v,1406)}catch(r){}n.crossDiv.style.display=“无”,n.marker_zindex(e),s=!0,g=!1,t.latLng=n.marker_Position(),google.maps.event.trigger(n.marker_u2;,“dragend”,t)}),google.maps.event.addListener(n.marker_2;.getMap(),“mousemove”,函数{var_2; l&(g)(s.latLng=new google.maps.latLng(s.latLng()-t,s.latLng.lng+-i),2; n.getProjection().fromLatLngToDivPixel(s.latLng),a&(n.crossDiv_2;.style.left=x+“px+”,n.crosstop.divy”,n.crossDiv_uxyl.style.display=“”,xyl.y-=p),n.marker_xyl.setPosition(n.getProjection().fromDivPixelToLatLng(xyl)),a&(n.eventDiv_xyl.style.top=xyl+p+“px”),google.maps.event.trigger(n.marker)(n.marker_xyl,“drag”,s)):(t=s=s.latLng.lat()-n.marker_xyl()-n.getPosition().lat(),i=s()-n.lat(),i=s.latLng(),i=s.latLng()-n.getPosition,o=n.marker\uu0.getMap().getCenter(),a=n.marker\u0.get(“raiseOnDrag”),g=!0,n.marker\u0.setZIndex(1e6),s.latLng=n.marker\u0.getPosition(),google.maps.event.trigger(n.marker\u0,“dragstart”,s)),google.maps.event.adddomstener(文档,“keydown”,函数(e){&&27==e.keyCode&&(a=!1,n.marker\u0.setPosition,r),n.marker\u0.getMap(),setCenter(),google.maps.event.trigger(document,“mouseup”,e))),google.maps.event.adddomstener(this.eventDiv_,“click”,函数(e){(n.marker_.getDraggable()| n.marker_.getClickable())&(s?s=!1:(google.maps.event.trigger(n.marker_,“click”,e),h(e))),google.maps.event.adddomstener(this.eventDiv,,“dblclick”,函数(e){||n、 marker.getClickable())&(google.maps.event.trigger(n.marker,“dblclick”,e),h(e)),google.maps.event.addListener(this.marker_uuuu,“dragstart”,function(e){g | | |(a=this.get(“raisendrag”)}),google.maps.event.addListener(this.marker,“drag”),function(e){g 1241e){a&(n.setPosition)(n.setPosition),n.labelDiv.style.zin=6+(this.get)(“labelding”)-1”):,google.maps.event.addListener(this.marker|,“dragend”,function(e){g|a&&n.setPosition(0)}),google.maps.event.addListener(this.marker|u,“position|changed”,function(){n.setZIndex()),google.maps.event.addListener(this.marker||,“position|changed”,function()),google.maps.event.addListener(this.marker|,visible|sed),function()){n.setVisible()})、google.maps.event.addListener(this.marker_,“labelvisible_已更改”,function(){n.setVisible()})、google.maps.event.addListener(this.marker_,“title_已更改”,function(