Remove the previous marker and add marker in the updated lat lng

后端 未结 2 455
你的背包
你的背包 2020-12-22 14:44

I have a gps device which sends data every 10 seconds. I am saving the data (lat, lng) in the MySql database., I am retrieving the data from the DB and putting the markers o

2条回答
  •  借酒劲吻你
    2020-12-22 15:19

    You should do

    map.addMarker(new MarkerOptions()
            .position(new LatLng(parseFloat(location.lat), parseFloat(location.lng)))
            .title("test!"));
    

    in displayLocation function

提交回复
热议问题