phonegap を使用してアプリを作成しています。私のページでは、画像をレンダリングするだけで、Javascript を使用して画像サイズを取得してマッピングを配置します。ユーザーがそのリンクをクリックした場合でも、コンピューターのブラウザーでズームします。
var img = new Image();
var imgheight = 0;
var imgwidth = 0;
//This loads the original image to a variable
var img = new Image();
//define onload function of variable
img.onload = function() {
imgheight = this.height
imgwidth = this.width;
var factorw = $('#'+imgId).width() / imgwidth;
var factorh = $('#'+imgId).height() / imgheight;
//these numbers are the default location of the link from the image
var x1 = factorw * 9;
var x2 = factorw * 285;
var y1 = factorh * 150;
var y2 = factorh * 250;
}
img.src = $('#sampleImg').attr('src');
しかし、デバイスでデバッグすると、モバイルデバイスのズームが異なるようです。デバイスから画像を拡大してリンクをクリックしようとすると、応答しません。リンクを置いたのと同じ場所をクリックした場合にのみ応答します。誰かがこれで私を助けることができますか?