Index: trunk/src/map/inc/nodemapWL.js
===================================================================
--- trunk/src/map/inc/nodemapWL.js	(revision 7770)
+++ trunk/src/map/inc/nodemapWL.js	(revision 7778)
@@ -9,4 +9,5 @@
 var overNode;
 
+
 //This function is called from index.php
 function initialize_map() {
@@ -18,4 +19,5 @@
 	map.setCenter(new GLatLng(52.162687, 4.493294), 11); 
 	map.setUIToDefault();
+ 
 
 	//Go through the array 'markers' (Declared in index.php) and add a marker for each marker stored in the array using our addMarker function
@@ -26,4 +28,7 @@
 	
 	GEvent.addListener(map, "click", function() {
+		
+	
+
 		if(!overNode == true)
 			deSelect();
@@ -46,8 +51,9 @@
 function addMarker(current, i) {
 	var id = current.id;
-	var marker  = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: current.name[0]});
+	var marker  = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: current.name[0]})	;
 	//Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map
 	GEvent.addListener(marker, 'mouseover', function() {
-	mouseOverNode(current.id, current.name[0]);
+	mouseOverNode(current.id, current.name[0],52.162687, 4.493294);
+	//mouseOverNode(current.id, current.name[0],current.latitude[0], current.longitude[0]);
 	});
 	GEvent.addListener(marker, 'click', function() {
@@ -67,20 +73,37 @@
 {
 	selected = true;
+	map.removeOverlay(polygon);
 	loadXMLDoc("inc/node_info.php?type=single");
 	/*
 	*Hieronder verdergaan met dekking
 	*/
+	
+
+	
 
 }
 //Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node.
-function mouseOverNode(id, name)
+function mouseOverNode(id, name, lat, long)
 {
 	if(!selected == true)
 	{
 		overNode = true;
+		
+		//alert(lat);
+		
+		
 		loadXMLDoc("inc/node_info.php?type=single&name="+name+"");
 		/*
 		*Hieronder verdergaan met dekking
 		*/
+		drawCircle(lat, long, 2.0, "#6C3", 1, 0.75, "#0F0",.2); 
+	
+		
+
+
+		
+		
+		
+		
 		
 	}	
@@ -90,4 +113,6 @@
 {
 	overNode = false;
+	map.removeOverlay(polygon);
+
 }
 
@@ -206,2 +231,7 @@
   }
 }
+
+
+
+
+
Index: trunk/src/map/inc/overlay.js
===================================================================
--- trunk/src/map/inc/overlay.js	(revision 7770)
+++ trunk/src/map/inc/overlay.js	(revision 7778)
@@ -1,88 +1,18 @@
-var map;
-var marker;
-var lat;
-var lon;
-var latOffset;
-var lonOffset;
-var polygon;
-var pos;
-var point;
-var range = 500;
+function drawCircle(lat, lng, radius, strokeColor, strokeWidth, strokeOpacity, fillColor, fillOpacity) {   
+    
+    var d2r = Math.PI/180;
+    var r2d = 180/Math.PI;
+    var Clat = radius * 0.0089437672;  // Convert statute kilometers into degrees latitude
+    var Clng = Clat/Math.cos(lat*d2r); 
+    var Cpoints = []; 
+    for (var i=0; i < 33; i++) { 
+      var theta = Math.PI * (i/16);
+      Cy = lat + (Clat * Math.sin(theta));
+      Cx = lng + (Clng * Math.cos(theta));
+      var P = new GLatLng(Cy, Cx);
+      Cpoints.push(P);
+    }
 
-	function nodeAdd() {
-	  if (GBrowserIsCompatible()) {
-        map = new GMap2(document.getElementById("mapcanvas"));
-        map.setCenter(new GLatLng(52.162687, 4.493294), 14); 
-        map.setUIToDefault();
-
-		marker = new GMarker(new GLatLng(52.165700, 4.483499));
-		GEvent.addListener(marker, "click", function () {
-			marker.openInfoWindowHtml("Test, Test, You suck! Eindelijk, het werkt!!!!");
-			});
-
-	  //Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map
-        GEvent.addListener(marker, "mouseover", function() {
-          map.addOverlay(cirkel);;
-        });
-		
-		//mouseout listener that removes the cirkel once the user moves his mouse off the designated marker
-		        GEvent.addListener(marker, "mouseout", function() {
-          map.removeOverlay(cirkel);
-        });
-		
-		//adds a cirkel when the user clicks on the marker
-				        GEvent.addListener(marker, "click", function() {
-          map.addOverlay(cirkel1);
-        });
-	
-
-      GPolygon.Shape = function(point,r1,r2,r3,r4,rotation,vertexCount,  strokeColour,strokeWeight,Strokepacity,fillColour,fillOpacity,opts,tilt) {
-        var rot = -rotation*Math.PI/180;
-        var points = [];
-	var latConv = point.distanceFrom(new GLatLng(point.lat()+0.1,point.lng()))*10;
- 	var lngConv = point.distanceFrom(new GLatLng(point.lat(),point.lng()+0.1))*10;
- 	var step = (360/vertexCount)||10;
-        
-        var flop = -1;
-        if (tilt) {
-          var I1=180/vertexCount;
-        } else {
-          var  I1=0;
-        }
-        for(var i=I1; i<=360.001+I1; i+=step) {
-          var r1a = flop?r1:r3;
-          var r2a = flop?r2:r4;
-          flop = -1-flop;
- 	  var y = r1a * Math.cos(i * Math.PI/180);
- 	  var x = r2a * Math.sin(i * Math.PI/180);
-          var lng = (x*Math.cos(rot)-y*Math.sin(rot))/lngConv;
-          var lat = (y*Math.cos(rot)+x*Math.sin(rot))/latConv;
-
- 	  points.push(new GLatLng(point.lat()+lat,point.lng()+lng));
-        }
-	return (new GPolygon(points,strokeColour,strokeWeight,Strokepacity,fillColour,fillOpacity,opts))
-      }
-
-      GPolygon.Circle = function(point,radius,strokeColour,strokeWeight,Strokepacity,fillColour,fillOpacity,opts) {
-        return GPolygon.Shape(point,radius,radius,radius,radius,0,100,strokeColour,strokeWeight,Strokepacity,fillColour,fillOpacity,opts)
-      }
-	  
-	  //   http://econym.org.uk/gmap/eshapes.htm voorbeeld.
-	  // de locatie van de cirkel
-	  
-
-			// locatie, doorsnee (in meters), kleur omtrek, dikte omtrek, ??, kleur opvulling, doorzichtigheid.
-			map.addOverlay(marker);
-		cirkel = new GPolygon.Circle(marker.getLatLng(),range,"#000000",0,1,"#00ff00",0.5)
-		cirkel1 = new GPolygon.Circle(marker.getLatLng(),range,"#000000",0,1,"#00ff00",0.5)
-		
-	  }
-	}
-	
-	
-	
-	
-	
-	
-	
-	
+    polygon = new GPolygon(Cpoints, strokeColor, strokeWidth, strokeOpacity, fillColor, fillOpacity);
+    map.addOverlay(polygon);
+   }
