function AmoMapInterface(type, mapParams)
{
  this.type = type;
  this.mapParams = mapParams;
    
  this.mapParams['map_center_x'] = parseFloat($('#adFormField-LONGITUDE').val());
  this.mapParams['map_center_y'] = parseFloat($('#adFormField-LATITUDE').val()); 
    
  if(this.type == 'google')
  {
    this.map = new GoogleMap(this); 
  }
  else if(this.type == 'yandex')
  {
    this.map = new YandexMap(this);
  }
  else
  {    
    return false;
  }     
}

AmoMapInterface.prototype.renderMap = function()
{
   this.map.renderMap();
}

AmoMapInterface.prototype.insertPointer = function(latlng, saveLatLng)
{
  this.map.insertPointer(latlng, saveLatLng);
}

AmoMapInterface.prototype.updateFields = function()
{
  this.map.updateFields();
}

AmoMapInterface.prototype.updateMarker = function(saveLatLng)
{
  this.map.updateMarker(saveLatLng);
}


