使用用户的实时位置抖动更新折线路线

问题描述

当我更新折线代码时,在位置更改方法上,它给了我额外的直线。当用户从一个源移动到目的地时,我想更新我的折线。我能够创建多段线路线,但我希望该路线随着用户的位置而变短。所以我用用户的当前位置替换源位置。如果用户更改的轮次与折线应更新的轮流不同,则按照谷歌地图应用程序中发生的情况。

下面是代码。

library(DT)
options(DT.options = list(pageLength = 5))
df = as.data.frame(cbind(matrix(round(rnorm(50),3),10),sample(0:1,10,TRUE)))
datatable(df) %>% formatStyle(names(df),background = styleColorBar(range(df),'lightblue'),backgroundSize = '98% 88%',backgroundRepeat = 'no-repeat',backgroundPosition = 'center')

enter image description here

任何帮助将不胜感激!

解决方法

通过在添加折线之前清除折线坐标解决了该问题。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...