0
我试图将可拖动的光标更改为等待光标,但它永远不会更改。在用户点击标记或边框后调用以下代码。当我点击一个物体时,光标从一只手张开到一只手。一旦URL请求完成,手就回到张开的手。在某些情况下,URL请求可能需要几秒钟才能完成。离开“map.setOptions({draggableCursor:'wait'});”编码或注释掉。draggableCursor不会更改为等待光标
我在做什么错?
- 杰夫
function httpRequest(url)
{
map.setOptions({draggableCursor:'wait'});
var pageRequest = false; //variable to hold ajax object
/*@cc_on
@if (@_jscript_version >= 5)
try {
pageRequest = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try {
pageRequest = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e2){
pageRequest = false
}
}
@end
@*/
if (!pageRequest && typeof XMLHttpRequest != 'undefined')
{pageRequest = new XMLHttpRequest();}
if (pageRequest)
{
pageRequest.open('GET', url, false); //get page synchronously
pageRequest.send(null);
openInfoWindow(pageRequest, 0);
}
map.setOptions({draggableCursor:null});
}
请注意,我创建了一个新的线程来处理如何/当光标变为链接 – GeoffSchultz
线程? Nvm ... http://stackoverflow.com/questions/12281440/strange-cursor-behavior-in-google-maps-v3具有类似的问题,身体/ html上的光标风格被谷歌地图div样式取代。 – ficuscr