Index: Makefile.am
===================================================================
--- Makefile.am	(revision 28)
+++ Makefile.am	(revision 41)
@@ -22,6 +22,7 @@
 	edit_win.h \
 	broken_edge.cc \
-	broken_edge.h
-
+	broken_edge.h \
+	new_map_win.cc \
+	new_map_win.h
 
 gd_CXXFLAGS = $(GTK_CFLAGS)
Index: graph_displayer_canvas-event.cc
===================================================================
--- graph_displayer_canvas-event.cc	(revision 40)
+++ graph_displayer_canvas-event.cc	(revision 41)
@@ -671,55 +671,76 @@
 	    case GDK_Return:
 	      {
-		Glib::ustring mapvalue = entrywidget.get_text();
-
-		double double_map_fract_value=0;
-		double double_map_value=0;
-		int offset=0;
-		int found_letter=0;
-		//converting text to double
-		for(int i=0;i<(int)(mapvalue.length());i++)
+		bool valid_double=true;
+		int point_num=0;
+		Glib::ustring mapvalue_str = entrywidget.get_text();
+
+		char * mapvalue_ch=new char [mapvalue_str.length()];
+		for(int i=0;i<(int)(mapvalue_str.length());i++)
 		  {
-		    if(((mapvalue[i]<='9')&&(mapvalue[i]>='0'))||(mapvalue[i]=='.'))
+		    if(((mapvalue_str[i]<'0')||(mapvalue_str[i]>'9'))&&(mapvalue_str[i]!='.'))
 		      {
-			if(mapvalue[i]=='.')
-			  {
-			    //for calculating non-integer part of double we step backward from the end
-			    //after each step the number will be divided by ten, and the new value will be added
-			    //to step backward from the end until the point the actual character of the string is the following:
-			    // mapvalue.length()-(i-position_of_point)
-			    //if i was the number of the first character after the decimal point the selected character will be the last
-			    //if i was the number of the last character, the selected character will be the first after the decimal point
-			    offset=mapvalue.length()+i;
-			  }
-			else
-			  {
-			    if(!offset)
-			      {
-				double_map_value=10*double_map_value+mapvalue[i]-'0';
-			      }
-			    else
-			      {
-				double_map_fract_value=double_map_fract_value/10+(double)(mapvalue[offset-i]-'0')/10;
-			      }
-			  }
+			valid_double=false;
 		      }
 		    else
 		      {
-			found_letter++;
-			continue;
+			if(mapvalue_str[i]=='.')
+			  {
+			    point_num++;
+			  }
 		      }
+		    mapvalue_ch[i]=mapvalue_str[i];
 		  }
-
-		if(!found_letter)
+  
+		double mapvalue_d=atof(mapvalue_ch);
+
+// 		double double_map_fract_value=0;
+// 		double double_map_value=0;
+// 		int offset=0;
+// 		int found_letter=0;
+		//converting text to double
+// 		for(int i=0;i<(int)(mapvalue.length());i++)
+// 		  {
+// 		    if(((mapvalue[i]<='9')&&(mapvalue[i]>='0'))||(mapvalue[i]=='.'))
+// 		      {
+// 			if(mapvalue[i]=='.')
+// 			  {
+// 			    //for calculating non-integer part of double we step backward from the end
+// 			    //after each step the number will be divided by ten, and the new value will be added
+// 			    //to step backward from the end until the point the actual character of the string is the following:
+// 			    // mapvalue.length()-(i-position_of_point)
+// 			    //if i was the number of the first character after the decimal point the selected character will be the last
+// 			    //if i was the number of the last character, the selected character will be the first after the decimal point
+// 			    offset=mapvalue.length()+i;
+// 			  }
+// 			else
+// 			  {
+// 			    if(!offset)
+// 			      {
+// 				double_map_value=10*double_map_value+mapvalue[i]-'0';
+// 			      }
+// 			    else
+// 			      {
+// 				double_map_fract_value=double_map_fract_value/10+(double)(mapvalue[offset-i]-'0')/10;
+// 			      }
+// 			  }
+// 		      }
+// 		    else
+// 		      {
+// 			found_letter++;
+// 			continue;
+// 		      }
+// 		  }
+
+		if((point_num<=1)&&(valid_double))
 		  {
 		    switch(actual_tool)
 		      {
 		      case EDGE_MAP_EDIT:
-			edgetextmap[active_edge]->property_text().set_value(mapvalue);
-			(*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=double_map_value+double_map_fract_value;
+			edgetextmap[active_edge]->property_text().set_value(mapvalue_str);
+			(*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d;
 			break;
 		      case NODE_MAP_EDIT:
-			nodetextmap[active_node]->property_text().set_value(mapvalue);
-			(*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=double_map_value+double_map_fract_value;
+			nodetextmap[active_node]->property_text().set_value(mapvalue_str);
+			(*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d;
 			break;
 		      default:
@@ -804,15 +825,18 @@
 }
 
-void GraphDisplayerCanvas::addNewEdgeMap()
-{
-  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (g,20);
-  mapstorage.addEdgeMap("NewEdgeMap",emptr);
-  mapwin->registerNewEdgeMap("NewEdgeMap");
-  changeEdgeText("NewEdgeMap");
-}
-
-void GraphDisplayerCanvas::addNewNodeMap()
-{
-  std::cout << "Add New NodeMap is not yet implemented." << std::endl;
-}
-
+void GraphDisplayerCanvas::addNewEdgeMap(double default_value, std::string mapname)
+{
+  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (g,default_value);
+  mapstorage.addEdgeMap(mapname,emptr);
+  mapwin->registerNewEdgeMap(mapname);
+  changeEdgeText(mapname);
+}
+
+void GraphDisplayerCanvas::addNewNodeMap(double default_value, std::string mapname)
+{
+  Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (g,default_value);
+  mapstorage.addNodeMap(mapname,emptr);
+  mapwin->registerNewNodeMap(mapname);
+  changeNodeText(mapname);
+}
+
Index: graph_displayer_canvas.cc
===================================================================
--- graph_displayer_canvas.cc	(revision 36)
+++ graph_displayer_canvas.cc	(revision 41)
@@ -6,5 +6,5 @@
 {
   
-  
+  //Initializing values.
   active_node=INVALID;
   active_edge=INVALID;
Index: graph_displayer_canvas.h
===================================================================
--- graph_displayer_canvas.h	(revision 40)
+++ graph_displayer_canvas.h	(revision 41)
@@ -111,7 +111,7 @@
 
   ///creates a new Nodemap
-  void addNewNodeMap();
+  void addNewNodeMap(double,std::string);
   ///creates a new Edgemap
-  void addNewEdgeMap();
+  void addNewEdgeMap(double,std::string);
 
 private:
Index: main_win.cc
===================================================================
--- main_win.cc	(revision 37)
+++ main_win.cc	(revision 41)
@@ -2,6 +2,10 @@
 
 MainWin::MainWin(const std::string& title, Graph & graph, CoordinatesMap & cm,
-    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),editwin("Editorial Window", gd_canvas),gd_canvas(graph, cm, ms, &mapwin)
+    MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),editwin("Editorial Window", gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin)
 {
+  //Creating a window for setting new maps.
+//   newmapwin=new NewMapWi("Creating new map",*this);
+
+
   set_title (title);
   set_default_size(WIN_WIDTH,WIN_HEIGHT);
@@ -50,8 +54,6 @@
   ag->add( Gtk::Action::create("EditNodeMap", Gtk::Stock::PREFERENCES),
       sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 5) );
-  ag->add( Gtk::Action::create("AddEdgeMap", Gtk::Stock::NEW),
-      sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::addNewEdgeMap ) );
-  ag->add( Gtk::Action::create("AddNodeMap", Gtk::Stock::NEW),
-      sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::addNewNodeMap ) );
+  ag->add( Gtk::Action::create("AddMap", Gtk::Stock::NEW),
+      sigc::mem_fun ( this->newmapwin, &NewMapWin::show ) );
 
   uim=Gtk::UIManager::create();
@@ -99,6 +101,5 @@
       "    <toolitem action='EditEdgeMap' />"
       "    <toolitem action='EditNodeMap' />"
-      "    <toolitem action='AddEdgeMap' />"
-      "    <toolitem action='AddNodeMap' />"
+      "    <toolitem action='AddMap' />"
       "  </toolbar>"
       "</ui>";
Index: main_win.h
===================================================================
--- main_win.h	(revision 9)
+++ main_win.h	(revision 41)
@@ -7,4 +7,5 @@
 #include <mapstorage.h>
 #include <map_win.h>
+#include <new_map_win.h>
 #include <edit_win.h>
 #include <libgnomecanvasmm.h>
@@ -29,4 +30,7 @@
   ///Window of editorial tools. Its type is \ref EditWin
   EditWin editwin;
+
+  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
+  NewMapWin newmapwin;
 
   ///The graph will be drawn on this \ref GraphDisplayerCanvas
Index: map_win.cc
===================================================================
--- map_win.cc	(revision 40)
+++ map_win.cc	(revision 41)
@@ -266,5 +266,5 @@
 void MapWin::registerNewNodeMap(std::string newmapname)
 {
-  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
+  for(int i=0;i<NODE_PROPERTY_NUM;i++)
   {
     //filling in combo box with choices
@@ -273,3 +273,5 @@
     n_combo_array[i].set_popdown_strings(listStrings);
   }
-}
+  Gtk::Entry* entry = n_combo_array[N_TEXT].get_entry();
+  entry->set_text((Glib::ustring)newmapname);
+}
