mirror of https://gitee.com/antv-l7/antv-l7
fix(pick):mousemove
This commit is contained in:
parent
6fc36a6ec6
commit
6d36ba8aa7
|
@ -28,9 +28,9 @@ export default class Engine extends EventEmitter {
|
|||
|
||||
}
|
||||
run() {
|
||||
|
||||
this.update();
|
||||
this.engineID = requestAnimationFrame(this.run.bind(this));
|
||||
|
||||
this.update();
|
||||
this.engineID = requestAnimationFrame(this.run.bind(this));
|
||||
}
|
||||
stop() {
|
||||
cancelAnimationFrame(this.engineID);
|
||||
|
|
|
@ -15,18 +15,3 @@ export function aProjectFlat(lnglat) {
|
|||
y = scale * (c * y + d) - 106744817;
|
||||
return { x, y };
|
||||
}
|
||||
export function world2LngLat(x, y) {
|
||||
const scale = 256 << 20;
|
||||
let d = Math.PI / 180;
|
||||
const a = 0.5 / Math.PI,
|
||||
b = 0.5,
|
||||
c = -0.5 / Math.PI;
|
||||
d = 0.5;
|
||||
x = ((x + 215440491) / scale - b) / a;
|
||||
y = ((y + 106744817) / scale - d) / c;
|
||||
y = (Math.atan(Math.pow(Math.E,y)) - (Math.PI / 4)) *2;
|
||||
const lat = y /d;
|
||||
const lng = x / d;
|
||||
return [lng,lat];
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ export default class GaodeMap {
|
|||
|
||||
}
|
||||
containerToLngLat(pixel) {
|
||||
const ll = new AMap.Pixel(pixel.x,pixel.y);
|
||||
const ll = new AMap.Pixel(pixel.x, pixel.y);
|
||||
return this.map.containerToLngLat(ll);
|
||||
}
|
||||
setMapStyle(style) {
|
||||
|
|
Loading…
Reference in New Issue