Event: Baidu Maps asynchronously creates markers in batches, and clicks a single marker to pop up a dialog box to report an error.
Error:
VM1771:1 Uncaught TypeError: b.ga(...).nb is not a function at HTMLSpanElement.eval (eval at zZ (getscript?v=2.0&ak=CBb579132…&services=&t=20170411141812:1), <anonymous>:1:1279)
Analysis: Breakpoint debugging learned that the point was created incorrectly.
Baidu point object: H {lng: 121.4879592445485, lat: 31.24944089864297}
Object created by myself: Object {lat: 31.249642115944074, lng: 121.48752080473454}
An error is reported due to inconsistent object types.
solve:
var point = gcj2bd(info.distY, info.distX);point = new BMap.Point(point.lng, point.lat);