javascript - Add a loading overlay onto google maps - Stack Overflow

Hi guys we have a google map v3 which loads in markers when dragged via ajax - I'm all ok with tha

Hi guys we have a google map v3 which loads in markers when dragged via ajax - I'm all ok with that - I'm just wondering how to add a loading bar on my map - I'm already using

container.style.filter = "alpha(opacity=60);";
                container.style.opacity = 0.6;  

and something else to stop dragging.

What's the best way to do that - if poss I would like to use some html and not an image.

Thanks Richard

Hi guys we have a google map v3 which loads in markers when dragged via ajax - I'm all ok with that - I'm just wondering how to add a loading bar on my map - I'm already using

container.style.filter = "alpha(opacity=60);";
                container.style.opacity = 0.6;  

and something else to stop dragging.

What's the best way to do that - if poss I would like to use some html and not an image.

Thanks Richard

Share Improve this question asked May 2, 2012 at 15:38 Richard HoushamRichard Housham 8642 gold badges17 silver badges34 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

I got the same problem and solved it by adding a layer over the map (In my case, I just need the loading, and I don't have any other reason to add another plugin):

HTML:

<div id="holder" style="position: relative;">
    <div class="overlay standard hidden">&nbsp</div>
    <div id="map"></div>
</div>

CSS:

div#holder {
    position: relative;
}

.hidden {
    display: none;
}

div.overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0.7;
    z-index: 1;
}

div.overlay.standard { background: #fff url(/image/loading.gif) no-repeat 50% 50%; }
  1. If you just want something that will place a rectangle containing text on the map, essentially a label, you may want to consider an: InfoBox
  2. If you want something that dynamically displays progress, you may want to use the: ProgressBarControl

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742324076a4422394.html

相关推荐

  • javascript - Add a loading overlay onto google maps - Stack Overflow

    Hi guys we have a google map v3 which loads in markers when dragged via ajax - I'm all ok with tha

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信