http://jsfiddle.net/doktormolle/jcHqt/上有一个教程即时消息,其带有静态地图标记的google maps问题是即时消息试图用我自己的标记替换标记,问题是当我尝试做时标记完全消失。任何导致此问题的建议。
body,html,#map_canvas{height:100%;margin:0;}
#map_canvas .centerMarker{
position:absolute;
/*url of the marker*/
background:url(http://cdn1.iconfinder.com/data/icons/Map-Markers-Icons-Demo-PNG/128/Map-Marker-Marker-Outside-Azure.png) no-repeat;
/*center the marker*/
top:50%;left:50%;
z-index:1;
/*fix offset when needed*/
margin-left:-10px;
margin-top:-34px;
/*size of the image*/
height:34px;
width:20px;
cursor:pointer;
}
由于您自己的标记大小为128x128像素,因此您应该将CSS大小设置为:
height: 128px;
width: 128px;
也许应该调整边距。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句