简体   繁体   English

谷歌地图每次都无法在地图上放置一些标记

[英]google maps everytime fails to place some markers on the map

im trying to place like 130/140 markers on a custom google map. 我试图在自定义的Google地图上放置130/140标记。

i inject the map with jquery and gmaps (http://gmap.nurtext.de/) everytime, at random (not related to specific markers) a lots of markers are not shown. 我每次都使用jquery和gmaps(http://gmap.nurtext.de/)注入地图,随机(与特定标记无关)没有显示很多标记。

firebug report this error: firebug报告此错误:

a is null

and this error comes from this file: 并且此错误来自此文件:

http://maps.gstatic.com/intl/it_ALL/mapfiles/285c/maps2.api/main.js

if i refresh the page...some other markers are "hidden" and other ones are shown. 如果我刷新页面...某些其他标记被“隐藏”,并且其他标记被显示。

anyone had this problem/can help me or suggest another safe way to show all markers? 任何人都有这个问题/可以帮助我或建议另一种安全的方式来显示所有标记吗?

thanks a lot! 非常感谢!


EDIT: this is how i inject the map and the markers (with a lots of address, but in this example only few) 编辑:这就是我注入地图和标记的方式(有很多地址,但是在这个例子中只有几个)

$(document).ready(function()
{
    $("#container").gMap(
        {
            scrollwheel: false,
            maptype: G_PHYSICAL_MAP,
            icon:
            {
                image: "files/images/gmap_pin.png",
                iconsize: [32, 37],
                iconanchor: [32, 37],
                infowindowanchor: [12, 0]
            },
            address: "Milano",
            zoom: 4,
            markers:
            [
            { address: "Viale Certosa, Milano" },
            { address: "Viale Ceccarini, Milano" },
            { address: "Viale Italia, Milano" },
            { address: "Via Rodi, Milano" },
            ]
        });
});

the problem is in the plugin itself. 问题出在插件本身上。 it try to get from gmaps the geocodes..but there is no callback that stop the cycled requests if there is some latency in the gmaps responses. 它会尝试从gmaps的地址解析中获取代码。.但是,如果gmaps响应中存在一些延迟,则没有回调可以停止循环请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM