We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.47.0
有高度的Maker弹出信息框,旋转地图,信息库和maker的相对位置不对。
https://codepen.io/whlysu/pen/XWmqvzM
The text was updated successfully, but these errors were encountered:
这个bug我改了,改的比较狼狈,贴出代码供大家参考,期望作者在下个版本进行修复 get3DPosition(){ const size = this.getSize(); const o = new Point(-size['width'] / 2, 0); if (!this.options['custom']) { o._sub(4, 12); } else { o._sub(0, size['height']); } const owner = this.getOwner(); if (owner instanceof Marker || owner instanceof MultiPoint) { let painter, markerSize; if (owner instanceof Marker) { painter = owner._getPainter(); markerSize = owner.getSize();
} else { const children = owner.getGeometries(); if (!children || !children.length) { return o; } painter = children[0]._getPainter(); markerSize = children[0].getSize(); } if (painter) { const fixExtent = painter.getFixedExtent(); o._add(fixExtent.xmax - markerSize.width / 2, fixExtent.ymin); const points = owner._getRenderPoints()[0]; if(painter.containerOffset === undefined){ const renderer = painter.getLayer()._getRenderer(); painter.containerOffset = painter.getMap()._pointToContainerPoint(renderer.southWest)._add(0, -painter.getMap().height); } const pps = painter._pointContainerPoints(points, 0, 0, undefined, true, undefined); const op = this.getMap().offsetPlatform() console.log("offset:" + o.x + "," + o.y); o._add(pps[0]); o._sub(op); //这里的偏移需要再加上 bnmap-front div的translate3d } } return o.round(); }
Sorry, something went wrong.
add altitude for UIComponent.getPosition, fix #1121
1ef31c3
1fdf51f
No branches or pull requests
maptalks's version and what browser you use?
0.47.0
Issue description
有高度的Maker弹出信息框,旋转地图,信息库和maker的相对位置不对。
Please provide a reproduction URL (on any jsfiddle like site)
https://codepen.io/whlysu/pen/XWmqvzM
The text was updated successfully, but these errors were encountered: