How to delete the blue origin position in Amap web API method?

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)
var map, geolocation;

//
map = new AMap.Map("container", {
    resizeEnable: true
});
map.plugin("AMap.Geolocation", function () {
    geolocation = new AMap.Geolocation({
        enableHighAccuracy: true, //:true
        timeout: 10000, //10:
        maximumAge: 0,           //0:0
        // convert: true,           //:true
        showButton: true, //:true
        buttonPosition: "LB", //:"LB"
        // buttonOffset: new AMap.Pixel(10, 20),//:Pixel(10, 20)
        showMarker: true,        //:true
        showCircle: true,        //:true
        panToLocation: true, //:true
        zoomToAccuracy: true      //:false
    });
    map.addControl(geolocation);
    geolocation.getCurrentPosition();
    AMap.event.addListener(geolocation, "complete", onComplete); //
    AMap.event.addListener(geolocation, "error", onError);
});

what result do you expect? What is the error message actually seen?

I wrote two of this code, the first location button is hidden, but the second click on the left square button in the picture, there is always an extra blue origin, how can I delete the original blue position when I relocate? All you need on the map is a blue origin

Mar.28,2021

has it been solved? Wait online

Menu