12 #include <osg/observer_ptr>
13 #include <osg/ref_ptr>
15 #include <osgEarth/Map>
16 #include <osgEarth/SceneGraphCallback>
17 #include <boost/unordered_map.hpp>
33 class FeaturePageObserver;
51 virtual void onLayerLoaded(
const osgEarth::MapNode* mapNode,
52 const osgEarth::ModelLayer* layer) =0;
56 virtual void onDataPreMerge(
const osgEarth::Map* map,
57 const osgEarth::ModelLayer* layer,
58 osg::Node* newData) = 0;
62 virtual void onDataLoaded(
const osgEarth::Map* map,
63 const osgEarth::ModelLayer* layer,
64 const osg::Node* newData) = 0;
70 virtual void onDataUnloaded(
const osgEarth::Map* map,
const osgEarth::ModelLayer* layer,
const osg::Node* oldData)
81 void addCallback(
const std::string& registrant, Callback* cb);
85 void setOptimizeStateSharing(
bool value);
86 bool getOptimizeStateSharing()
const;
93 void addModelLayer(osgEarth::ModelLayer* layer);
97 void notifyNewLayer(osgEarth::ModelLayer* layer);
103 void notifyPreMergeData(osgEarth::ModelLayer* layer, osg::Node* node);
108 void notifyNewData(osgEarth::ModelLayer* layer, osg::Node* data);
112 void notifyDataDeleted(osgEarth::ModelLayer* layer, osg::Node* data);
121 bool readFeatureNameRegistrationFile(
const std::string& path,
125 std::string getFeatureNameFromModelLayer(
const osgEarth::ModelLayer& layer );
141 typedef boost::unordered_multimap<std::string, CallbackRefPtr>
143 typedef std::pair<FeatureDataCallbackMap::iterator,
145 typedef std::pair<FeatureDataCallbackMap::const_iterator,
146 FeatureDataCallbackMap::const_iterator>
156 typedef boost::unordered_map<std::string, std::vector<std::string> >
159 typedef boost::unordered_map<std::string,