/* Constructor for an extended Marker class */
function CountyMarker(latlng, icon){
    this.County = "";
    this.Grid = "";
    var opts = {};
    opts.draggable = false;
    opts.icon = icon;

    GMarker.call(this,latlng,opts);
}


/* It's a limitation of JavaScript inheritance that we can't conveniently
   extend GMarker without having to run its constructor. In order for the
   constructor to run, it requires some dummy GLatLng. */
CountyMarker.prototype = new GMarker(new GLatLng(0, 0));

CountyMarker.prototype.setCounty = function(county){
  this.County = county;
}

CountyMarker.prototype.setGrid = function(grid){
  this.Grid = grid;
}
CountyMarker.prototype.getCounty = function(){
  return this.County;
}

CountyMarker.prototype.getGrid = function(){
  return this.Grid;
}

// Creates the text div that goes over the marker.
CountyMarker.prototype.initialize = function(map) {
	// Do the GMarker constructor first.
	GMarker.prototype.initialize.call(this, map);

}

// Redraw the rectangle based on the current projection and zoom level
CountyMarker.prototype.redraw = function(force) {
	GMarker.prototype.redraw.call(this, map);

}

// Remove the main DIV from the map pane
CountyMarker.prototype.remove = function() {
  GMarker.prototype.remove.call(this);
}

