Index: trunk/BNC/src/bncmap.cpp
===================================================================
--- trunk/BNC/src/bncmap.cpp	(revision 4622)
+++ 	(revision )
@@ -1,296 +1,0 @@
-// Part of BNC, a utility for retrieving decoding and
-// converting GNSS data streams from NTRIP broadcasters.
-//
-// Copyright (C) 2007
-// German Federal Agency for Cartography and Geodesy (BKG)
-// http://www.bkg.bund.de
-// Czech Technical University Prague, Department of Geodesy
-// http://www.fsv.cvut.cz
-//
-// Email: euref-ip@bkg.bund.de
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation, version 2.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/* -------------------------------------------------------------------------
- * BKG NTRIP Client
- * -------------------------------------------------------------------------
- *
- * Class:      bncmap
- *
- * Purpose:    This class plots map from Ntrip source-table meta data
- *
- * Author:     J. Dousa, Pecny, Czech Republic
- * Created:    21-may-2012
- *
- * Changes:
- *
- * -----------------------------------------------------------------------*/
- 
-#include <iostream>
-#include "bncmap.h"
-
-// ------------
-bncMap::bncMap(QWidget* parent) : QDialog(parent)
-{
-  _LaOff   = 25;   // shift longitude
-  _mapScen = new QGraphicsScene();
-  _mapView = new BncMapView();
-  _mapView->setScene(_mapScen);
-  _mapView->resetScale();
-  slotReadMap();
-  slotCreateMap();
-  _mapScen->setSceneRect(QRect(0,-90,360,180));
-
-  setWindowTitle(tr("Source-Table Map [*]"));
- 
-  /* close button */
-  QPushButton* buttClose = new QPushButton("Close");
-  connect(buttClose, SIGNAL(clicked()), this, SLOT(close()));
-   
-  /* rescale button */
-//  QPushButton* buttClean = new QPushButton("Clean");
-//  connect(buttClean, SIGNAL(clicked()), this, SLOT(slotCleanMap()));
-
-  /* zoom button */
-  QPushButton* buttZoomIn = new QPushButton("Zoom +");
-  connect(buttZoomIn, SIGNAL(clicked()), this, SLOT(slotZoomIn()));
-
-  /* zoom button */
-  QPushButton* buttZoomOut = new QPushButton("Zoom -");
-  connect(buttZoomOut, SIGNAL(clicked()), this, SLOT(slotZoomOut()));
-
-  /* reset button */
-  QPushButton* buttReset = new QPushButton("World");
-  connect(buttReset, SIGNAL(clicked()), this, SLOT(slotResetMap()));
-
-  /* fit button */
-  QPushButton* buttFit = new QPushButton("Fit Map");
-  connect(buttFit, SIGNAL(clicked()), this, SLOT(slotFitMap()));
-
-  /* font reset button */
-  QPushButton* buttFont = new QPushButton("Fit Font");
-  connect(buttFont, SIGNAL(clicked()), this, SLOT(slotFitFont()));
-
-  /* layout */
-  QVBoxLayout* MapLayout = new QVBoxLayout;
-  QHBoxLayout* ButLayout = new QHBoxLayout;
-   
-  ButLayout->addWidget(buttZoomIn);
-  ButLayout->addWidget(buttZoomOut);
-//  ButLayout->addWidget(buttClean);
-  ButLayout->addWidget(buttReset);
-  ButLayout->addWidget(buttFit);
-  ButLayout->addWidget(buttFont);
-  ButLayout->addWidget(buttClose);
-   
-  MapLayout->addWidget(_mapView);
-  MapLayout->addLayout(ButLayout);
-   
-  setLayout(MapLayout);
-
-  this->show();
-}
-
-
-// ------------
-bncMap::~bncMap(){ 
-   delete _mapView;
-}
-
-
-// ------------
-void bncMap::slotReadMap()
-{   
-  QFile world(":worldmap.dat");
-  float fi, la;
-
-  world.open(QIODevice::ReadOnly | QIODevice::Text);
-     
-  QTextStream in(&world);
-  in.setRealNumberNotation(QTextStream::FixedNotation);
-
-  while( ! in.atEnd() ){
-
-    in >> la >> fi;
-
-    // la = 0-360
-    while( la <    0 ){ la += 360; }
-    while( la >= 360 ){ la -= 360; }
-     
-    // fi opposite
-    _worldMap << QPointF( la, -fi );
-	 
-  }
-  world.close();
-}
-
-
-// ------------
-void bncMap::slotCreateMap()
-{  
-  //  _mapScen->setForegroundBrush(QBrush(Qt::lightGray, Qt::CrossPattern));   // grid
-
-  int begIdx = 0;
-  int endIdx = 0;
-  for( int i=0; i < _worldMap.size(); i++ ){
-    if( _worldMap.at(i).x() == 0.0 and _worldMap.at(i).y() == 0.0 ){
-      if( i > 0 ){
-	 endIdx = i-1;
-        while( begIdx < endIdx ){
-
- 	  int l1 = 0;
-	  int l2 = 0;
-
-          float la1 = _worldMap.at(begIdx+0).x() + _LaOff;
-          float fi1 = _worldMap.at(begIdx+0).y();
-          float la2 = _worldMap.at(begIdx+1).x() + _LaOff;
-          float fi2 = _worldMap.at(begIdx+1).y();
-          begIdx++;
-	    
-	  while( la1 <    0 ){ la1 += 360; l1++; }
-	  while( la1 >= 360 ){ la1 -= 360; l1--; }
-	  while( la2 <    0 ){ la2 += 360; l2++; }
-	  while( la2 >= 360 ){ la2 -= 360; l2--; }
-
-	  if( l1 != 0 and l2 == 0 ){ continue; } // break this line
-	  if( l2 != 0 and l1 == 0 ){ continue; } // break this line
-
-          _mapScen->addLine(la1, fi1, la2, fi2, QPen(QBrush(Qt::gray),0.3));
-        }
-      }
-      if( i+1 < _worldMap.size() ) begIdx = i+1;
-    }
-  }
-}
-
-
-// ------------
-void bncMap::slotCleanMap()
-{
-  QMutexLocker locker(&_mutexMap);
-  _mapScen->clear();
-  slotCreateMap();
-  slotResetMap();
-  slotFitFont();
-}
-
-
-// ------------
-void bncMap::slotResetMap()
-{
-  _mapView->resetScale();
-}
-
-
-// ------------
-void bncMap::slotFitMap()
-{  
-  QRectF reg = _allPoints.boundingRect().adjusted(-10,-10,10,10);
-   
-  _mapView->resetScale();
-  _mapView->updateSceneRect(reg);
-  _mapView->centerOn(reg.center());
-  _mapView->fitInView(reg,Qt::KeepAspectRatio);
-
-  slotFitFont();
-}
-
-
-// ------------
-void bncMap::slotFitFont()
-{  
-  _mapScen->clear();
-  slotCreateMap();
-
-  float fontrate  = _mapView->scale_rate();
-  float pointrate = _mapView->scale_rate();
-   
-  QMapIterator<QString, QList<QVariant> >  it(_allNames);
-  while( it.hasNext() ){  
-     
-     it.next();
-     QString name = it.key();     
-     QList<QVariant> tmp = it.value();
-       
-     double la    = tmp.at(0).toPointF().x();
-     double fi    = tmp.at(0).toPointF().y();
-     QPen   pen   = tmp.at(1).value<QPen>();
-     double basPT = tmp.at(2).toDouble();
-     double basFT = tmp.at(3).toDouble();
-     
-     float tmpPT = pointrate * basPT;
-     float tmpFT =  fontrate * basFT;
-     
-     if( fontrate > 1 ){
-       tmpPT = basPT;
-       tmpFT = basFT;
-     }
-     
-     QFont font(QFont("Arial",2));
-           font.setPointSizeF( tmpFT );
-           font.setStretch(QFont::Unstretched);
-           font.setCapitalization(QFont::Capitalize);
-
-     QGraphicsTextItem* nameItem = new QGraphicsTextItem( name );
-     nameItem->setFont( font );
-    
-     nameItem->setPos( la - basFT, fi - basFT );
-
-     if( tmpPT < 0.15 ) tmpPT = 0.15;
-     pen.setWidthF(tmpPT);
-
-    _mapScen->addItem( nameItem );
-    _mapScen->addEllipse( la, fi, tmpPT, tmpPT, pen );
-  }
-  _mapView->zoom( 1.0 );
-}
-
-
-// ------------
-void bncMap::slotZoomIn()
-{  
-  _mapView->zoom( 1.2 );
-  slotFitFont();
-}
-
-
-// ------------
-void bncMap::slotZoomOut()
-{  
-  _mapView->zoom( 1/1.2 );
-  slotFitFont();
-}
-
-
-// ------------
-void bncMap::slotNewPoint(QPointF point, QString name, QPen pen, double size)
-{
-  float la =   point.x() + _LaOff;
-  float fi = - point.y();
-   
-  while( la <    0 ){ la += 360; }
-  while( la >= 360 ){ la -= 360; }
-   
-  QPointF tmppoint(la,fi);
-  _allPoints << tmppoint;
-
-  if( ! name.isEmpty() ){
-
-    QList<QVariant> tmp;
-    tmp << tmppoint      // QPoint
-        << pen           // QPen
-        << size << 4.5;  // base pointsize, fontrate
-    _allNames.insert( name, tmp );
-  }
-}
Index: trunk/BNC/src/bncmap.h
===================================================================
--- trunk/BNC/src/bncmap.h	(revision 4622)
+++ 	(revision )
@@ -1,61 +1,0 @@
-// Part of BNC, a utility for retrieving decoding and
-// converting GNSS data streams from NTRIP broadcasters.
-//
-// Copyright (C) 2012
-// German Federal Agency for Cartography and Geodesy (BKG)
-// http://www.bkg.bund.de
-//
-// Author's email: jan.dousa@pecny.cz
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation, version 2.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#ifndef BNCMAP_H
-#define BNCMAP_H
-
-#include <QtGui>
-#include "bncmapview.h"
-
-class bncMap : public QDialog
-{
- Q_OBJECT
-     
- public:
-    bncMap(QWidget* parent = 0 );
-   ~bncMap();
-   
- public slots:
-   void slotNewPoint(QPointF, QString, QPen, double);
-   void slotResetMap();
-   void slotFitFont();
-   void slotFitMap();
-   void slotZoomIn();
-   void slotZoomOut();
-   void slotCreateMap();
-   void slotCleanMap();
-   void slotReadMap();
-   
- private:
-   
-   double          _LaOff;
-
-   BncMapView*     _mapView;
-   QGraphicsScene* _mapScen;
-   QPolygonF       _worldMap;
-   QPolygonF       _allPoints;
-   QMutex          _mutexMap;
-   QMultiMap< QString, QList<QVariant> > _allNames;
-
-};
-
-#endif
Index: trunk/BNC/src/bncmap_old.cpp
===================================================================
--- trunk/BNC/src/bncmap_old.cpp	(revision 4623)
+++ trunk/BNC/src/bncmap_old.cpp	(revision 4623)
@@ -0,0 +1,296 @@
+// Part of BNC, a utility for retrieving decoding and
+// converting GNSS data streams from NTRIP broadcasters.
+//
+// Copyright (C) 2007
+// German Federal Agency for Cartography and Geodesy (BKG)
+// http://www.bkg.bund.de
+// Czech Technical University Prague, Department of Geodesy
+// http://www.fsv.cvut.cz
+//
+// Email: euref-ip@bkg.bund.de
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation, version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Client
+ * -------------------------------------------------------------------------
+ *
+ * Class:      bncmap
+ *
+ * Purpose:    This class plots map from Ntrip source-table meta data
+ *
+ * Author:     J. Dousa, Pecny, Czech Republic
+ * Created:    21-may-2012
+ *
+ * Changes:
+ *
+ * -----------------------------------------------------------------------*/
+ 
+#include <iostream>
+#include "bncmap.h"
+
+// ------------
+bncMap::bncMap(QWidget* parent) : QDialog(parent)
+{
+  _LaOff   = 25;   // shift longitude
+  _mapScen = new QGraphicsScene();
+  _mapView = new BncMapView();
+  _mapView->setScene(_mapScen);
+  _mapView->resetScale();
+  slotReadMap();
+  slotCreateMap();
+  _mapScen->setSceneRect(QRect(0,-90,360,180));
+
+  setWindowTitle(tr("Source-Table Map [*]"));
+ 
+  /* close button */
+  QPushButton* buttClose = new QPushButton("Close");
+  connect(buttClose, SIGNAL(clicked()), this, SLOT(close()));
+   
+  /* rescale button */
+//  QPushButton* buttClean = new QPushButton("Clean");
+//  connect(buttClean, SIGNAL(clicked()), this, SLOT(slotCleanMap()));
+
+  /* zoom button */
+  QPushButton* buttZoomIn = new QPushButton("Zoom +");
+  connect(buttZoomIn, SIGNAL(clicked()), this, SLOT(slotZoomIn()));
+
+  /* zoom button */
+  QPushButton* buttZoomOut = new QPushButton("Zoom -");
+  connect(buttZoomOut, SIGNAL(clicked()), this, SLOT(slotZoomOut()));
+
+  /* reset button */
+  QPushButton* buttReset = new QPushButton("World");
+  connect(buttReset, SIGNAL(clicked()), this, SLOT(slotResetMap()));
+
+  /* fit button */
+  QPushButton* buttFit = new QPushButton("Fit Map");
+  connect(buttFit, SIGNAL(clicked()), this, SLOT(slotFitMap()));
+
+  /* font reset button */
+  QPushButton* buttFont = new QPushButton("Fit Font");
+  connect(buttFont, SIGNAL(clicked()), this, SLOT(slotFitFont()));
+
+  /* layout */
+  QVBoxLayout* MapLayout = new QVBoxLayout;
+  QHBoxLayout* ButLayout = new QHBoxLayout;
+   
+  ButLayout->addWidget(buttZoomIn);
+  ButLayout->addWidget(buttZoomOut);
+//  ButLayout->addWidget(buttClean);
+  ButLayout->addWidget(buttReset);
+  ButLayout->addWidget(buttFit);
+  ButLayout->addWidget(buttFont);
+  ButLayout->addWidget(buttClose);
+   
+  MapLayout->addWidget(_mapView);
+  MapLayout->addLayout(ButLayout);
+   
+  setLayout(MapLayout);
+
+  this->show();
+}
+
+
+// ------------
+bncMap::~bncMap(){ 
+   delete _mapView;
+}
+
+
+// ------------
+void bncMap::slotReadMap()
+{   
+  QFile world(":worldmap.dat");
+  float fi, la;
+
+  world.open(QIODevice::ReadOnly | QIODevice::Text);
+     
+  QTextStream in(&world);
+  in.setRealNumberNotation(QTextStream::FixedNotation);
+
+  while( ! in.atEnd() ){
+
+    in >> la >> fi;
+
+    // la = 0-360
+    while( la <    0 ){ la += 360; }
+    while( la >= 360 ){ la -= 360; }
+     
+    // fi opposite
+    _worldMap << QPointF( la, -fi );
+	 
+  }
+  world.close();
+}
+
+
+// ------------
+void bncMap::slotCreateMap()
+{  
+  //  _mapScen->setForegroundBrush(QBrush(Qt::lightGray, Qt::CrossPattern));   // grid
+
+  int begIdx = 0;
+  int endIdx = 0;
+  for( int i=0; i < _worldMap.size(); i++ ){
+    if( _worldMap.at(i).x() == 0.0 and _worldMap.at(i).y() == 0.0 ){
+      if( i > 0 ){
+	 endIdx = i-1;
+        while( begIdx < endIdx ){
+
+ 	  int l1 = 0;
+	  int l2 = 0;
+
+          float la1 = _worldMap.at(begIdx+0).x() + _LaOff;
+          float fi1 = _worldMap.at(begIdx+0).y();
+          float la2 = _worldMap.at(begIdx+1).x() + _LaOff;
+          float fi2 = _worldMap.at(begIdx+1).y();
+          begIdx++;
+	    
+	  while( la1 <    0 ){ la1 += 360; l1++; }
+	  while( la1 >= 360 ){ la1 -= 360; l1--; }
+	  while( la2 <    0 ){ la2 += 360; l2++; }
+	  while( la2 >= 360 ){ la2 -= 360; l2--; }
+
+	  if( l1 != 0 and l2 == 0 ){ continue; } // break this line
+	  if( l2 != 0 and l1 == 0 ){ continue; } // break this line
+
+          _mapScen->addLine(la1, fi1, la2, fi2, QPen(QBrush(Qt::gray),0.3));
+        }
+      }
+      if( i+1 < _worldMap.size() ) begIdx = i+1;
+    }
+  }
+}
+
+
+// ------------
+void bncMap::slotCleanMap()
+{
+  QMutexLocker locker(&_mutexMap);
+  _mapScen->clear();
+  slotCreateMap();
+  slotResetMap();
+  slotFitFont();
+}
+
+
+// ------------
+void bncMap::slotResetMap()
+{
+  _mapView->resetScale();
+}
+
+
+// ------------
+void bncMap::slotFitMap()
+{  
+  QRectF reg = _allPoints.boundingRect().adjusted(-10,-10,10,10);
+   
+  _mapView->resetScale();
+  _mapView->updateSceneRect(reg);
+  _mapView->centerOn(reg.center());
+  _mapView->fitInView(reg,Qt::KeepAspectRatio);
+
+  slotFitFont();
+}
+
+
+// ------------
+void bncMap::slotFitFont()
+{  
+  _mapScen->clear();
+  slotCreateMap();
+
+  float fontrate  = _mapView->scale_rate();
+  float pointrate = _mapView->scale_rate();
+   
+  QMapIterator<QString, QList<QVariant> >  it(_allNames);
+  while( it.hasNext() ){  
+     
+     it.next();
+     QString name = it.key();     
+     QList<QVariant> tmp = it.value();
+       
+     double la    = tmp.at(0).toPointF().x();
+     double fi    = tmp.at(0).toPointF().y();
+     QPen   pen   = tmp.at(1).value<QPen>();
+     double basPT = tmp.at(2).toDouble();
+     double basFT = tmp.at(3).toDouble();
+     
+     float tmpPT = pointrate * basPT;
+     float tmpFT =  fontrate * basFT;
+     
+     if( fontrate > 1 ){
+       tmpPT = basPT;
+       tmpFT = basFT;
+     }
+     
+     QFont font(QFont("Arial",2));
+           font.setPointSizeF( tmpFT );
+           font.setStretch(QFont::Unstretched);
+           font.setCapitalization(QFont::Capitalize);
+
+     QGraphicsTextItem* nameItem = new QGraphicsTextItem( name );
+     nameItem->setFont( font );
+    
+     nameItem->setPos( la - basFT, fi - basFT );
+
+     if( tmpPT < 0.15 ) tmpPT = 0.15;
+     pen.setWidthF(tmpPT);
+
+    _mapScen->addItem( nameItem );
+    _mapScen->addEllipse( la, fi, tmpPT, tmpPT, pen );
+  }
+  _mapView->zoom( 1.0 );
+}
+
+
+// ------------
+void bncMap::slotZoomIn()
+{  
+  _mapView->zoom( 1.2 );
+  slotFitFont();
+}
+
+
+// ------------
+void bncMap::slotZoomOut()
+{  
+  _mapView->zoom( 1/1.2 );
+  slotFitFont();
+}
+
+
+// ------------
+void bncMap::slotNewPoint(QPointF point, QString name, QPen pen, double size)
+{
+  float la =   point.x() + _LaOff;
+  float fi = - point.y();
+   
+  while( la <    0 ){ la += 360; }
+  while( la >= 360 ){ la -= 360; }
+   
+  QPointF tmppoint(la,fi);
+  _allPoints << tmppoint;
+
+  if( ! name.isEmpty() ){
+
+    QList<QVariant> tmp;
+    tmp << tmppoint      // QPoint
+        << pen           // QPen
+        << size << 4.5;  // base pointsize, fontrate
+    _allNames.insert( name, tmp );
+  }
+}
Index: trunk/BNC/src/bncmap_old.h
===================================================================
--- trunk/BNC/src/bncmap_old.h	(revision 4623)
+++ trunk/BNC/src/bncmap_old.h	(revision 4623)
@@ -0,0 +1,61 @@
+// Part of BNC, a utility for retrieving decoding and
+// converting GNSS data streams from NTRIP broadcasters.
+//
+// Copyright (C) 2012
+// German Federal Agency for Cartography and Geodesy (BKG)
+// http://www.bkg.bund.de
+//
+// Author's email: jan.dousa@pecny.cz
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation, version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#ifndef BNCMAP_H
+#define BNCMAP_H
+
+#include <QtGui>
+#include "bncmapview.h"
+
+class bncMap : public QDialog
+{
+ Q_OBJECT
+     
+ public:
+    bncMap(QWidget* parent = 0 );
+   ~bncMap();
+   
+ public slots:
+   void slotNewPoint(QPointF, QString, QPen, double);
+   void slotResetMap();
+   void slotFitFont();
+   void slotFitMap();
+   void slotZoomIn();
+   void slotZoomOut();
+   void slotCreateMap();
+   void slotCleanMap();
+   void slotReadMap();
+   
+ private:
+   
+   double          _LaOff;
+
+   BncMapView*     _mapView;
+   QGraphicsScene* _mapScen;
+   QPolygonF       _worldMap;
+   QPolygonF       _allPoints;
+   QMutex          _mutexMap;
+   QMultiMap< QString, QList<QVariant> > _allNames;
+
+};
+
+#endif
Index: trunk/BNC/src/bncmapview.cpp
===================================================================
--- trunk/BNC/src/bncmapview.cpp	(revision 4622)
+++ 	(revision )
@@ -1,174 +1,0 @@
-
-#include <QGraphicsScene>
-#include <QGraphicsTextItem>
-#include <QTextStream>
-#include <QScrollBar>
-#include <QMouseEvent>
-#include <QWheelEvent>
-#include <QDebug>
-#include <iostream>
-
-#include "bncmapview.h"
-
-
-// -------------
-BncMapView::BncMapView(QWidget* parent) : QGraphicsView(parent) 
-{
-  setCursor(Qt::OpenHandCursor);
-  setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
-  resetScale();
-}
-
-/* -------------
- * Sets the current centerpoint.  Also updates the scene's center point.
- * Unlike centerOn, which has no way of getting the floating point center
- * back, SetCenter() stores the center point.  It also handles the special
- * sidebar case.  This function will claim the centerPoint to sceneRec ie.
- * the centerPoint must be within the sceneRec.
- */
-void BncMapView::SetCenter(const QPointF& centerPoint) 
-{
-   // get the rectangle of the visible area in scene coords
-   QRectF visibleArea = mapToScene(rect()).boundingRect();
-   
-   // get the scene area
-   QRectF sceneBounds = sceneRect();
-   
-   double boundX      = + visibleArea.width()  / 2.0;
-   double boundY      = - visibleArea.height() / 2.0;  // opposite sign for latitude !
-
-   double boundWidth  = sceneBounds.width()  - boundX * 2.0;
-   double boundHeight = sceneBounds.height() - boundY * 2.0;
- 
-   // the max boundary that the centerPoint can be to
-   QRectF bounds(boundX, boundY, boundWidth, boundHeight);
-   
-   if( bounds.contains(centerPoint) ){
-      // we are within the bounds
-      _currentCenterPoint = centerPoint;
-      
-   }else{
-	
-      // we need to clamp or use the center of the screen
-      if( visibleArea.contains(sceneBounds) ){
-	     
-         // use the center of scene ie. we can see the whole scene
-         _currentCenterPoint = sceneBounds.center();
-
-      }else{
-	 _currentCenterPoint = centerPoint;
-
-	 // we need to clamp the center. The centerPoint is too large
-	 if( centerPoint.x() > bounds.x() + bounds.width() ){
-	    _currentCenterPoint.setX(bounds.x() + bounds.width());
-	    
-	 }else if( centerPoint.x() < bounds.x() ){
-	    _currentCenterPoint.setX(bounds.x());
-	 }
-
-	 // opposite sign for latitude !
-	 if( centerPoint.y() < - bounds.y() - bounds.height() ){
-  	    _currentCenterPoint.setY( - bounds.y() - bounds.height());
-	    
-	 }else if( centerPoint.y() > - bounds.y() ){
-	    _currentCenterPoint.setY( - bounds.y());
-	 }
-      }
-   }
-   // update the scrollbars
-   centerOn(_currentCenterPoint);
-}
-
-
-// -------------
-void BncMapView::mousePressEvent(QMouseEvent* event) 
-{
-//   std::cout << " PRES " << event->pos().x() << " " << event->pos().y() << std::endl;
-   _lastPanPoint = event->pos();
-   setCursor(Qt::ClosedHandCursor);
-}
-
-
-// -------------
-void BncMapView::mouseReleaseEvent(QMouseEvent* /* event */) 
-{   
-   setCursor(Qt::OpenHandCursor);
-   _lastPanPoint = QPoint();
-}
-
- 
-// -------------
-void BncMapView::mouseMoveEvent(QMouseEvent* event) 
-{    
-   if( !_lastPanPoint.isNull() ){
-	
-     // get how much we panned
-     QPointF delta = mapToScene(_lastPanPoint) - mapToScene(event->pos());
-     _lastPanPoint = event->pos();
-
-     // update the center ie. do the pan
-     SetCenter(GetCenter() + delta);
-   }
-}
-
-
-// -------------
-void BncMapView::wheelEvent(QWheelEvent* event) 
-{
-   // het the position of the mouse before scaling, in scene coords
-   QPointF pointBeforeScale(mapToScene(event->pos()));
-   
-   // get the original screen centerpoint
-   QPointF screenCenter = GetCenter();
-   
-   // scale the view ie. do the zoom
-   double scaleFactor = 1.10; // how fast we zoom
-   if( event->delta() > 0 ){
-
-     // zooming in
-     zoom( scaleFactor );
-      
-   }else{
-
-     // zooming out
-     zoom( 1.0/scaleFactor );
-   }
-   
-   // get the position after scaling, in scene coords
-   QPointF pointAfterScale(mapToScene(event->pos()));
-   
-   // get the offset of how the screen moved
-   QPointF offset = pointBeforeScale - pointAfterScale;
-   
-   // adjust to the new center for correct zooming
-   QPointF newCenter = screenCenter + offset;
-   SetCenter(newCenter);
-}
-
- 
-// -------------
-void BncMapView::resizeEvent(QResizeEvent* event) 
-{
-   // get the rectangle of the visible area in scene coords
-   QRectF visibleArea = mapToScene(rect()).boundingRect();
-   SetCenter(visibleArea.center());
-   
-   // call the subclass resize so the scrollbars are updated correctly
-   QGraphicsView::resizeEvent(event);
-}
-
-
-// -------------
-void BncMapView::resetScale()
-{
-  _scale = _scCur = 2.0;
-  setMatrix(QMatrix(_scale,0,0,_scale,0,0));
-}
-
-
-// -------------
-void BncMapView::zoom(qreal scale)
-{
-   QGraphicsView::scale( scale, scale );
-  _scCur = _scCur * scale;
-}
Index: trunk/BNC/src/bncmapview.h
===================================================================
--- trunk/BNC/src/bncmapview.h	(revision 4622)
+++ 	(revision )
@@ -1,42 +1,0 @@
-
-#ifndef BNCMAPVIEW_H
-#define BNCMAPVIEW_H
- 
-#include <QGraphicsView>
-#include <QGraphicsRectItem>
-#include <iostream>
- 
-class BncMapView : public QGraphicsView
-{
- Q_OBJECT;
-   
- public:
-    BncMapView(QWidget* parent = NULL);
-
-    virtual void resetScale();
-    virtual void zoom(qreal scale);
-
-    double scale(){ return _scale; }
-    double scale_curr(){ return _scCur; }
-    double scale_rate(){ return _scale/_scCur; }
-
-    
- protected:    
-    QPointF _currentCenterPoint;                       // centerpoint for for panning and zooming
-    QPoint  _lastPanPoint;                             // from panning the view   
-    void    SetCenter(const QPointF& centerPoint);     // set the current centerpoint in the
-   
-    QPointF GetCenter(){ return _currentCenterPoint; }
-
-    virtual void mousePressEvent(QMouseEvent* event);
-    virtual void mouseReleaseEvent(QMouseEvent* event);
-    virtual void mouseMoveEvent(QMouseEvent* event);
-    virtual void wheelEvent(QWheelEvent* event);
-    virtual void resizeEvent(QResizeEvent* event);
-   
-  private:
-    double          _scale;  // scale
-    double          _scCur;  // current relative scale
-};
- 
-#endif
Index: trunk/BNC/src/bncmapview_old.cpp
===================================================================
--- trunk/BNC/src/bncmapview_old.cpp	(revision 4623)
+++ trunk/BNC/src/bncmapview_old.cpp	(revision 4623)
@@ -0,0 +1,174 @@
+
+#include <QGraphicsScene>
+#include <QGraphicsTextItem>
+#include <QTextStream>
+#include <QScrollBar>
+#include <QMouseEvent>
+#include <QWheelEvent>
+#include <QDebug>
+#include <iostream>
+
+#include "bncmapview.h"
+
+
+// -------------
+BncMapView::BncMapView(QWidget* parent) : QGraphicsView(parent) 
+{
+  setCursor(Qt::OpenHandCursor);
+  setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+  resetScale();
+}
+
+/* -------------
+ * Sets the current centerpoint.  Also updates the scene's center point.
+ * Unlike centerOn, which has no way of getting the floating point center
+ * back, SetCenter() stores the center point.  It also handles the special
+ * sidebar case.  This function will claim the centerPoint to sceneRec ie.
+ * the centerPoint must be within the sceneRec.
+ */
+void BncMapView::SetCenter(const QPointF& centerPoint) 
+{
+   // get the rectangle of the visible area in scene coords
+   QRectF visibleArea = mapToScene(rect()).boundingRect();
+   
+   // get the scene area
+   QRectF sceneBounds = sceneRect();
+   
+   double boundX      = + visibleArea.width()  / 2.0;
+   double boundY      = - visibleArea.height() / 2.0;  // opposite sign for latitude !
+
+   double boundWidth  = sceneBounds.width()  - boundX * 2.0;
+   double boundHeight = sceneBounds.height() - boundY * 2.0;
+ 
+   // the max boundary that the centerPoint can be to
+   QRectF bounds(boundX, boundY, boundWidth, boundHeight);
+   
+   if( bounds.contains(centerPoint) ){
+      // we are within the bounds
+      _currentCenterPoint = centerPoint;
+      
+   }else{
+	
+      // we need to clamp or use the center of the screen
+      if( visibleArea.contains(sceneBounds) ){
+	     
+         // use the center of scene ie. we can see the whole scene
+         _currentCenterPoint = sceneBounds.center();
+
+      }else{
+	 _currentCenterPoint = centerPoint;
+
+	 // we need to clamp the center. The centerPoint is too large
+	 if( centerPoint.x() > bounds.x() + bounds.width() ){
+	    _currentCenterPoint.setX(bounds.x() + bounds.width());
+	    
+	 }else if( centerPoint.x() < bounds.x() ){
+	    _currentCenterPoint.setX(bounds.x());
+	 }
+
+	 // opposite sign for latitude !
+	 if( centerPoint.y() < - bounds.y() - bounds.height() ){
+  	    _currentCenterPoint.setY( - bounds.y() - bounds.height());
+	    
+	 }else if( centerPoint.y() > - bounds.y() ){
+	    _currentCenterPoint.setY( - bounds.y());
+	 }
+      }
+   }
+   // update the scrollbars
+   centerOn(_currentCenterPoint);
+}
+
+
+// -------------
+void BncMapView::mousePressEvent(QMouseEvent* event) 
+{
+//   std::cout << " PRES " << event->pos().x() << " " << event->pos().y() << std::endl;
+   _lastPanPoint = event->pos();
+   setCursor(Qt::ClosedHandCursor);
+}
+
+
+// -------------
+void BncMapView::mouseReleaseEvent(QMouseEvent* /* event */) 
+{   
+   setCursor(Qt::OpenHandCursor);
+   _lastPanPoint = QPoint();
+}
+
+ 
+// -------------
+void BncMapView::mouseMoveEvent(QMouseEvent* event) 
+{    
+   if( !_lastPanPoint.isNull() ){
+	
+     // get how much we panned
+     QPointF delta = mapToScene(_lastPanPoint) - mapToScene(event->pos());
+     _lastPanPoint = event->pos();
+
+     // update the center ie. do the pan
+     SetCenter(GetCenter() + delta);
+   }
+}
+
+
+// -------------
+void BncMapView::wheelEvent(QWheelEvent* event) 
+{
+   // het the position of the mouse before scaling, in scene coords
+   QPointF pointBeforeScale(mapToScene(event->pos()));
+   
+   // get the original screen centerpoint
+   QPointF screenCenter = GetCenter();
+   
+   // scale the view ie. do the zoom
+   double scaleFactor = 1.10; // how fast we zoom
+   if( event->delta() > 0 ){
+
+     // zooming in
+     zoom( scaleFactor );
+      
+   }else{
+
+     // zooming out
+     zoom( 1.0/scaleFactor );
+   }
+   
+   // get the position after scaling, in scene coords
+   QPointF pointAfterScale(mapToScene(event->pos()));
+   
+   // get the offset of how the screen moved
+   QPointF offset = pointBeforeScale - pointAfterScale;
+   
+   // adjust to the new center for correct zooming
+   QPointF newCenter = screenCenter + offset;
+   SetCenter(newCenter);
+}
+
+ 
+// -------------
+void BncMapView::resizeEvent(QResizeEvent* event) 
+{
+   // get the rectangle of the visible area in scene coords
+   QRectF visibleArea = mapToScene(rect()).boundingRect();
+   SetCenter(visibleArea.center());
+   
+   // call the subclass resize so the scrollbars are updated correctly
+   QGraphicsView::resizeEvent(event);
+}
+
+
+// -------------
+void BncMapView::resetScale()
+{
+  _scale = _scCur = 2.0;
+  setMatrix(QMatrix(_scale,0,0,_scale,0,0));
+}
+
+
+// -------------
+void BncMapView::zoom(qreal scale)
+{
+   QGraphicsView::scale( scale, scale );
+  _scCur = _scCur * scale;
+}
Index: trunk/BNC/src/bncmapview_old.h
===================================================================
--- trunk/BNC/src/bncmapview_old.h	(revision 4623)
+++ trunk/BNC/src/bncmapview_old.h	(revision 4623)
@@ -0,0 +1,42 @@
+
+#ifndef BNCMAPVIEW_H
+#define BNCMAPVIEW_H
+ 
+#include <QGraphicsView>
+#include <QGraphicsRectItem>
+#include <iostream>
+ 
+class BncMapView : public QGraphicsView
+{
+ Q_OBJECT;
+   
+ public:
+    BncMapView(QWidget* parent = NULL);
+
+    virtual void resetScale();
+    virtual void zoom(qreal scale);
+
+    double scale(){ return _scale; }
+    double scale_curr(){ return _scCur; }
+    double scale_rate(){ return _scale/_scCur; }
+
+    
+ protected:    
+    QPointF _currentCenterPoint;                       // centerpoint for for panning and zooming
+    QPoint  _lastPanPoint;                             // from panning the view   
+    void    SetCenter(const QPointF& centerPoint);     // set the current centerpoint in the
+   
+    QPointF GetCenter(){ return _currentCenterPoint; }
+
+    virtual void mousePressEvent(QMouseEvent* event);
+    virtual void mouseReleaseEvent(QMouseEvent* event);
+    virtual void mouseMoveEvent(QMouseEvent* event);
+    virtual void wheelEvent(QWheelEvent* event);
+    virtual void resizeEvent(QResizeEvent* event);
+   
+  private:
+    double          _scale;  // scale
+    double          _scCur;  // current relative scale
+};
+ 
+#endif
Index: trunk/BNC/src/src.pro
===================================================================
--- trunk/BNC/src/src.pro	(revision 4622)
+++ trunk/BNC/src/src.pro	(revision 4623)
@@ -54,5 +54,5 @@
           bncfigurelate.h bncpppclient.h bncversion.h                 \ 
           bancroft.h bncmodel.h bncfigureppp.h bncrawfile.h           \ 
-          bnctides.h bncmap.h bncmapview.h bncantex.h                 \
+          bnctides.h bncmap_svg.h bncantex.h                          \
           bncephuser.h bncoutf.h bncclockrinex.h bncsp3.h             \
           bncbytescounter.h bncsslconfig.h reqcdlg.h                  \
@@ -83,5 +83,5 @@
           bncfigurelate.cpp bncpppclient.cpp bnctime.cpp              \
           bancroft.cpp bncmodel.cpp bncfigureppp.cpp bncrawfile.cpp   \
-          bnctides.cpp bncmap.cpp bncmapview.cpp bncantex.cpp         \
+          bnctides.cpp bncmap_svg.cpp bncantex.cpp                    \
           bncephuser.cpp bncoutf.cpp bncclockrinex.cpp bncsp3.cpp     \
           bncbytescounter.cpp bncsslconfig.cpp reqcdlg.cpp            \
