We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0249069 + ec1a55d commit 45bcbe6Copy full SHA for 45bcbe6
src/lib/cyleaflet_clientside.js
@@ -16,9 +16,8 @@ var conversion_factor = 20037508.34;
16
// We also flip the sign of the y-value to match Cytoscape's coordinate system
17
function lonLatToXY(lon, lat) {
18
var x = lon * conversion_factor / 180;
19
- var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
20
- y = y * conversion_factor / 180;
21
- return [x, -y];
+ var y = -Math.log(Math.tan((90 + lat) * Math.PI / 360)) * conversion_factor / Math.PI;
+ return [x, y];
22
}
23
24
// Convert EPSG:3857 to EPSG:4326
0 commit comments