1 // A group of 2D Canvas elements which get automatically transformed according
2 // to the map parameters.
4 // Copyright (C) 2012 Thomas Geymayer <tomgey@gmail.com>
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Library General Public
8 // License as published by the Free Software Foundation; either
9 // version 2 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Library General Public License for more details.
16 // You should have received a copy of the GNU Library General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef CANVAS_MAP_HXX_
21 #define CANVAS_MAP_HXX_
23 #include "CanvasGroup.hxx"
25 #include <boost/shared_ptr.hpp>
26 #include <boost/unordered_map.hpp>
33 class HorizontalProjection;
38 Map( const CanvasWeakPtr& canvas,
39 const SGPropertyNode_ptr& node,
40 const Style& parent_style,
41 Element* parent = 0 );
44 virtual void update(double dt);
46 virtual void childAdded( SGPropertyNode * parent,
47 SGPropertyNode * child );
48 virtual void childRemoved( SGPropertyNode * parent,
49 SGPropertyNode * child );
50 virtual void valueChanged(SGPropertyNode * child);
54 virtual void childChanged(SGPropertyNode * child);
56 typedef boost::unordered_map< SGPropertyNode*,
57 boost::shared_ptr<GeoNodePair>
60 boost::shared_ptr<HorizontalProjection> _projection;
61 bool _projection_dirty;
77 GeoCoord parseGeoCoord(const std::string& val) const;
81 } // namespace simgear
83 #endif /* CANVAS_MAP_HXX_ */