收藏
回答

小程序使用腾讯地图进行goe解析问题


这个是之前我在两个项目中都使用的一个通过内置地图选择位置,然后利用腾讯地图解析的一个方法,前两个都正常,但目前这个项目不知道哪里的问题,都是执行不成功,通过调试,得到以下信息

[Deprecation] Resource requests whose URLs contain raw newline characters are deprecated, and may be blocked in M60, around August 2017. Please remove newlines from places like element attribute values in order to continue loading those resources. See https://www.chromestatus.com/features/5735596811091968 for more details.


同时地图请求的连接也不一样,前两个项目中的地图请求地址为https://apis.map.qq.com/ws/geocoder/v1/?coord_type=5&get_poi=0&output=json&key=##################&location=36.708329%2C119.134741,并且执行成功,

而现在这个请求的地址为:https://apis.map.qq.com/ws/geocoder/v1/?extend=function%20()%20{var%20target%20=%20this;for%20(var%20i%20=%200;%20i%20%3C%20arguments.length;%20i++)%20{for%20(var%20x%20in%20arguments[i])%20{if%20(arguments[i].hasOwnProperty(x))%20{var%20obj%20=%20arguments[i][x];if%20(obj%20&&%20obj.isPlainObject())%20{target[x]%20=%20Object.extend(target[x],%20obj);}%20else%20{target[x]%20=%20obj;}}}}return%20target;}&isPlainObject=function%20()%20{if%20(this.toString()%20!==%20%22[object%20Object]%22)%20{return%20false;}var%20proto%20=%20Object.getPrototypeOf(this);if%20(!proto)%20{return%20true;}var%20Ctor%20=%20this.hasOwnProperty.call(proto,%20%22constructor%22)%20&&%20proto.constructor;return%20typeof%20Ctor%20===%20%22function%22%20&&%20this.hasOwnProperty.toString.call(Ctor)%20===%20this.hasOwnProperty.toString.call(Object);}&coord_type=5&get_poi=0&output=json&key=###############&location=36.70631%2C119.13625  然后就报了上文列出的异常


现在我也没有心思去排查了,有没有知道这个问题原因的直接告诉一下是怎么回事?


最后一次编辑于  2018-06-07
回答关注问题邀请回答
收藏