// javascript var mapData = new Array(); var map; var loginTimer; function checkBounds() { return; // Perform the check and return if OK if (allowedBounds.contains(map.getCenter())) { return; } // It`s not OK, so find the nearest allowed point and move there var C = map.getCenter(); var X = C.lng(); var Y = C.lat(); var AmaxX = allowedBounds.getNorthEast().lng(); var AmaxY = allowedBounds.getNorthEast().lat(); var AminX = allowedBounds.getSouthWest().lng(); var AminY = allowedBounds.getSouthWest().lat(); if (X < AminX) {X = AminX;} if (X > AmaxX) {X = AmaxX;} if (Y < AminY) {Y = AminY;} if (Y > AmaxY) {Y = AmaxY;} //alert ("Restricting "+Y+" "+X); map.setCenter(new GLatLng(Y,X)); } function createMarker(point,text,title,location,pen_name,linkstory) { // create the icon!! var tiny = new GIcon(); tiny.image = "imgs/map_star.png"; tiny.iconSize = new GSize(35,35); tiny.iconAnchor = new GPoint(17,35); tiny.transparent = "imgs/map_star.png"; // image map!! tiny.imageMap = [28,2,28,7,6,29,10,27,22,23,3,21,8,14,16,22,23,23,21,6,4,4,5,14,8,29,24,29,19,21]; // the point on the icon that the tip of the bubble sits on use - (negetive for above) tiny.infoWindowAnchor = new GPoint(22,4); var opts = {title: title,icon:tiny }; var marker = new GMarker(point,opts); GEvent.addListener( marker, "click", function() { //alert("click"); marker.openInfoWindowHtml('
'+title+'
'+location+'
By '+pen_name+'

'+text+'...
'); }); return marker; } function startmap() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("gmap")); var lng="51.57744";var lat=" -0.090721";var zoom=11; // using lat,lng created above, center the map on the latest story entered in the DB!!! map.setCenter(new GLatLng(lng,lat), zoom); // end of centering // add some map controls! map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); // Restrict the zoom to london only!! - work in progress!!! var mt = map.getMapTypes(); for (var i=0; i