根据后台实时的数据进行地图切换

0 投票
室内外地图切换

以前的方式 通过后台的数据来判断,在方法内就直接进行地图切换,以前的是二维,资源小

可以直接切换,现在的是三维,每一秒加载一次地图不现实

解决的思路:

再写一个地图切换的方法,通过获取ajax的返回值mapID 来进行地图切换

然后在地图加载的方法里 也通过mapid的返回值来确定url

目前的问题

获取不到返回值

<!--5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tJZCI6IjI4ODMtMTYwNjc5MTMwNzI1MSIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcyI6eyJsaW5lLWhlaWdodCI6MS42MjUsImFsaWduIjoibGVmdCIsImluZGVudCI6MCwidGV4dC1pbmRlbnQiOjAsImJhY2stY29sb3IiOiIiLCJwYWRkaW5nIjoiIn0sInR5cGUiOiJwYXJhZ3JhcGgiLCJyaWNoVGV4dCI6eyJkYXRhIjpbeyJjaGFyIjoi5a6kIiwic3R5bGVzIjp7ImZvbnQtc2l6ZSI6MTYsImNvbG9yIjoiIzRkNGQ0ZCIsImJhY2stY29sb3IiOiIjZmZmZmZmIn19LHsiY2hhciI6IuWGhSIsInN0eWxlcyI6eyJmb250LXNpemUiOjE2LCJjb2xvciI6IiM0ZDRkNGQiLCJiYWNrLWNvbG9yIjoiI2ZmZmZmZiJ9fSx7ImNoYXIiOiLlpJYiLCJzdHlsZXMiOnsiZm9udC1zaXplIjoxNiwiY29sb3IiOiIjNGQ0ZDRkIiwiYmFjay1jb2xvciI6IiNmZmZmZmYifX0seyJjaGFyIjoi5ZywIiwic3R5bGVzIjp7ImZvbnQtc2l6ZSI6MTYsImNvbG9yIjoiIzRkNGQ0ZCIsImJhY2stY29sb3IiOiIjZmZmZmZmIn19LHsiY2hhciI6IuWbviIsInN0eWxlcyI6eyJmb250LXNpemUiOjE2LCJjb2xvciI6IiM0ZDRkNGQiLCJiYWNrLWNvbG9yIjoiI2ZmZmZmZiJ9fSx7ImNoYXIiOiLliIciLCJzdHlsZXMiOnsiZm9udC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OnsiZGF0YSI6W3siY2hhciI6IuiOtyJ9LHsiY2hhciI6IuWPliJ9LHsiY2hhciI6IuS4jSJ9LHsiY2hhciI6IuWIsCJ9LHsiY2hhciI6Iui/lCJ9LHsiY2hhciI6IuWbniJ9LHsiY2hhciI6IuWAvCJ9XSwiaXNSaWNoVGV4dCI6dHJ1ZSwia2VlcExpbmVCcmVhayI6dHJ1ZX19XQ==-->
12月 1, 2020 分类:  111次浏览 | 用户: zhouzheng (6 分)

1个回答

0 投票
你好,请问您具体是使用什么产品,是webgl开发吗?
12月 2, 2020 用户: 张亮 名扬四海 (2,288 分)
你好我用的webgl JavaScript  就是前端不太会写这个功能 遇到了些问题

如果把切换地图功能直接写在回调函数内部的话 网页会非常卡  因为我每一秒就请求了数据

写在外部的话我又不会
...