ARTICLE AD BOX
I hosted my DisplayMap.php script on a WEB site to display a Google Map with a specific latitude / longitude / zoom, supplied as parameters:
<!DOCTYPE html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0px; padding: 0px } #map_canvas { height: 100% } .infomsg { display:none } </style> <script type="text/javascript" src="https://maps.google.com/maps/api/js?key={FillInYourOwnKey}> </script> <script type="text/javascript"> var map; var mapOptions = { tilt: 0, disableDefaultUI: true }; // Redessiner la carte ailleurs function redraw(newview, newlat, newlon, newzoom) { if (newview == 'H') mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID; else if (newview == 'P') mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN; else mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP; mapOptions.zoom = newzoom; mapOptions.center = new google.maps.LatLng(newlat, newlon); if (!map) map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); else map.setOptions(mapOptions); } // Main function function initialize() { var view = '<?php echo $_GET["v"]; ?>'; var lon = <?php echo $_GET["x"]; ?> + 0; var lat = <?php echo $_GET["y"]; ?> + 0; var zoom = <?php echo $_GET["z"]; ?> + 0; redraw(view, lat, lon, zoom); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:100%; height:100%"></div> </body> </html>All my computers are set with a display resolution of 1920 X 1080 with a scale factor of 100%. On all computers, I open a maximized Google Chrome window, so the display area must contain a viewport with a similar size. On all computers, I paste the following URL to call my script:
http://quadgen.ca/QuadGenMap.php?v=H&x=-72.02156&y=48.57706&z=11
I am expecting a similar result on both computers. On 99% of the computers, I get the "Correct.png" image where the entire lake St-Jean can be seen.
On a few computers (same screen resolution, same scale factor), I get an "Incorrect.png" image which looks more zoomed in that what I was getting on most computers. What can I do to fix this?
