The company made a number of public mall, positioning is always a problem, so there are always a few hundred meters of error. Just yesterday the project manager let me check the positioning of the reason there are errors.
First, I look at this method, so a few parameters.
Object object
Attributes | Types of | Defaults | Mandatory | Explanation | Minimum version |
---|---|---|---|---|---|
type | string | wgs84 | no | wgs84 return gps coordinates, gcj02 coordinates may be used to return the wx.openLocation | |
altitude | string | false | no | Incoming true height information returns, due to the need to obtain a higher height accuracy, it will slow down the speed of the interface returns | 1.6.0 |
success | function | no | Interface call success callback function | ||
fail | function | no | Interface calls the failure callback function | ||
complete | function | no | Interface calls the end of the callback function (call succeeds, the failure will be executed) |
See above document, the problem is basically to determine the type parameters.
Look at the code, it really using wgs84, so I immediately changed gcj02, and then tested in developer tools. Thought that without any problems. But a look at the position is not changed.
I do not know the course a little bit. . . It's that several parameters should be wrong, so they Baidu a bit.
Some people encounter the same problem that needs real test. We need real test! We need real test!
I flew with my noble iPhone! Sure enough, the positioning flew accurately.
It must be real test. Otherwise, it would wait for the pit!