Baidu map added some dimension points, but drag or zoom the map, the dimension points will disappear?

var data = {
            query: "",
            page_size: 20,
            radius: "2000",
            output: "json",
            ak: "av0gRXBETn44ByDpMgYhj95P9nACGns9"
        };

        var map = new BMap.Map("container");
        map.enableScrollWheelZoom(true);

        var top_right_navigation = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT, type: BMAP_NAVIGATION_CONTROL_SMALL})
        map.addControl(top_right_navigation);

        // 
        var geoc = new BMap.Geocoder();
        var geolocation = new BMap.Geolocation();
        geolocation.getCurrentPosition(function(r){
            if(this.getStatus() == BMAP_STATUS_SUCCESS){
                data.location = r.point.lat.toFixed(3)+","+r.point.lng.toFixed(3);
                var point = new BMap.Point(r.point.lng.toFixed(3), r.point.lat.toFixed(3));
                map.centerAndZoom(point, 15);

                $.ajax({
                    url: "http://api.map.baidu.com/place/v2/search",
                    data: data,
                    type: "GET",
                    dataType: "jsonp",
                    success: function (data) {
                        var result  = data.results;
                        addMarker(result)
                    }
                });
                // ,
                function addMarker(result){
                    var itmes;
                    var data = result;
                    var point = {};
                    for(var i=0;i<data.length;iPP) {
                        itmes = result[i];
                        point["lng"] = itmes.location.lng;
                        point["lat"] = itmes.location.lat;
                        var marker = new BMap.Marker(point);
                        map.addOverlay(marker);
                    }
                }
            }else {
                alert(""+this.getStatus());
            }
        },{enableHighAccuracy: true});

:

Thank you!


is probably because the coordinates of these annotation points are obtained through ajax, and I don't know how it is realized inside Baidu map. In my project, Baidu Map is in another page, which needs to be put into iframe by clicking a button, so I first prepare the data to be stored locally when the page is refreshed. It is no problem to get the page of Baidu map.

Menu