function initialize(locationradius,fauxlat,fauxlong,locationzoom,game_id) {
    var fauxLatlng = new google.maps.LatLng(fauxlat, fauxlong);
    var typeId = [google.maps.MapTypeId.HYBRID,google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE];
    var myOptions = {
      zoom: parseInt(locationzoom),
      center: fauxLatlng,
      navigationControl: true,
      navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL, position: google.maps.ControlPosition.RIGHT},
      mapTypeControl: true,
      mapTypeId: google.maps.MapTypeId.HYBRID,
      mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.MapTypeControlStyle.RIGHT,mapTypeIds: typeId},
	  scrollwheel: false,
	  streetViewControl: false,
	}

	var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	
	addCircle(map,locationradius,fauxlat,fauxlong);


  var image = new google.maps.MarkerImage('http://ispy.s3.amazonaws.com/game/small/'+game_id+'.jpg',
      // This marker is 20 pixels wide by 32 pixels tall.
      new google.maps.Size(64, 96),
      // The origin for this image is 0,0.
      new google.maps.Point(0,0),
      // The anchor for this image is the base of the flagpole at 0,32.
      new google.maps.Point(32, 48)
  );

  var beachMarker = new google.maps.Marker({
      position: fauxLatlng,
      map: map,
      icon: image
  });
	
}

function buildCircle(centerPoint, circleRadius, circleUnits) {
        // Collect 360 points for a circle Polygon
        var circlePoints = Array();
        with (Math) {
          if (circleUnits == 'KM') {
            // distance in KM
            var rLat = (circleRadius/6378.8) * (180/PI);
          } else {
            // distance in MI
            var rLat = (circleRadius/3963.189) * (180/PI);
          }
          var rLng = rLat/cos(centerPoint.lat() * (PI/180));

          for (var a = 0 ; a < 361 ; a++) {
            var aRad = a*(PI/180);
            var x = centerPoint.lng() + (rLng * cos(aRad));
            var y = centerPoint.lat() + (rLat * sin(aRad));
            var point = new google.maps.LatLng(parseFloat(y),parseFloat(x));
            circlePoints.push(point);
          }
        }
    return circlePoints;
}

function addCircle(map,locationradius,fauxlat,fauxlong){
	var circleRadius = locationradius;
	var circleUnits = 'MI';
	var circleCenter = new google.maps.LatLng(fauxlat, fauxlong);
	var theCircle = buildCircle(circleCenter, circleRadius, circleUnits);

	drawCircle = new google.maps.Polygon({
      paths: theCircle,
      strokeColor: "#0e4950",
      strokeOpacity: 0.8,
      strokeWeight: 2,
      fillColor: "#0e4950",
      fillOpacity: 0.35
    });

   drawCircle.setMap(map);
}



