Last Spotted: ' + 'Thursday July 01st 04:07 CST' + '
Badge data provided by FireEagle ';
if (document.getElementById('fireeagle_map')) {
var map = new YMap(document.getElementById('fireeagle_map'), YAHOO_MAP_REG);
map.addTypeControl();
map.addZoomLong();
map.addPanControl();
var myPoint = new YGeoPoint( 31.7883455 , 35.208487);
function calculateZoom(minX, maxX, minY, maxY) {
var mapElement = document.getElementById("fireeagle_map")
var degLonPerPixel = Math.abs(maxX - minX) / parseInt(mapElement.style.width);
var degLatPerPixel = Math.abs(maxY - minY) / parseInt(mapElement.style.height);
var resolution = Math.max(degLonPerPixel, degLatPerPixel);
return Math.ceil(20 - Math.log(1.465025 / resolution) / Math.log(2) );
}
var cPT0 = new YGeoPoint(31.729191,35.160912);
var cPT1 = new YGeoPoint(31.729191,35.256062);
var cPT2 = new YGeoPoint(31.8475,35.256062);
var cPT3 = new YGeoPoint(31.8475,35.160912);
var cPT4 = new YGeoPoint(31.729191,35.160912);
// args: array of pts, color, width, alpha
var poly1 = new YPolyline([cPT0,cPT1,cPT2,cPT3,cPT4],'blue',7,0.7);
var bBox1 = new YGeoPoint( 31.729191 , 35.160912 );
var bBox2 = new YGeoPoint( 31.8475 , 35.256062 );
var bestZoom = calculateZoom( 35.160912, 35.256062, 31.729191, 31.8475);
map.addOverlay(poly1);
//alert(bestZoom);
map.drawZoomAndCenter(myPoint, bestZoom);
}