即使遵循https://developers.google.com/chrome-developer-tools/docs/remote-debugging中列出的步骤,我似乎也无法使用DevTools设备功能在我的Samsung Galaxy S4上工作
我的设备有Chrome v32和Chrome Beta v33,而我的电脑有Chrome v33和Chrome Canary v35.
我的设备已启用USB调试,并且已安装设备驱动程序.我从来没有得到上述链接中步骤3中提示的批准RSA密钥指纹的提示,但设备确实连接到我的PC以允许媒体传输.我甚至根据上面的链接撤销了所有USB调试授权.
我的PC没有为Android开发安装额外的东西,这可能是个问题.我希望利用此功能从设备的角度检查网页.
我正在使用 Highmaps 创建一个飞行路径图,使用他们的演示简单飞行路线( jsfiddle ) 作为起点。当我更新代码以使用世界地图时,位置/标记之间的线路径会因夸张的曲线而扭曲。
请参阅我的 jsfiddle,其中我仅将演示修改为以下内容:
HTML
<!-- line 5 -->
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
Run Code Online (Sandbox Code Playgroud)
JavaScript
// line 39
mapData: Highcharts.maps['custom/world'],
// line 47
data: Highcharts.geojson(Highcharts.maps['custom/world'], 'mapline'),
Run Code Online (Sandbox Code Playgroud)
查看两者之间的区别,其中之前是 Highcharts 演示,之后是我上面提到的一些更改:
路径是通过函数计算的,该函数pointsToPath
使用Q
SVG 中的二次贝塞尔曲线来弯曲标记之间绘制的线。
// Function to return an SVG path between two points, with an arc
function pointsToPath(from, to, invertArc) {
var arcPointX = (from.x + to.x) / (invertArc ? 2.4 : 1.6),
arcPointY = (from.y + to.y) / …
Run Code Online (Sandbox Code Playgroud)