Ignore:
Timestamp:
Dec 11, 2015 12:21:12 AM (8 years ago)
Author:
ldelgass
Message:

Add command to configure attributes to display in feature info placard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Renderer.h

    r5942 r5944  
    5252#include "MouseCoordsTool.h"
    5353#include "ScaleBar.h"
     54#include "Placard.h"
    5455
    5556// Controls if TGA format is sent to client
     
    514515    void writeScene(const std::string& file);
    515516
     517    void setPlacardConfig(const Placard& placardConf, const char *layerName);
     518
    516519    void selectFeatures(std::vector<unsigned long>& featureIDs, const char *layerName);
    517520
     
    550553        return _placeNodes.get();
    551554    }
     555    Placard getPlacardConfig(const std::string& layerName)
     556    {
     557        Placard ret;
     558        PlacardHashmap::iterator itr = _placardConfigs.find(layerName);
     559        if (itr != _placardConfigs.end()) {
     560            ret = itr->second;
     561        }
     562        return ret;
     563    }
    552564
    553565private:
    554566    typedef std::tr1::unordered_map<ColorMapId, osg::ref_ptr<osg::TransferFunction1D> > ColorMapHashmap;
    555567    typedef std::tr1::unordered_map<ViewpointId, osgEarth::Viewpoint> ViewpointHashmap;
     568    typedef std::tr1::unordered_map<std::string, Placard> PlacardHashmap;
    556569
    557570    void initAnnotations();
     
    603616    osg::ref_ptr<osg::Group> _graticule;
    604617    osg::ref_ptr<osg::Group> _annotations;
     618    PlacardHashmap _placardConfigs;
    605619    double _anchorLat, _anchorLong;
    606620    osg::ref_ptr<osgEarth::Annotation::FeatureNode> _selectionBox;
Note: See TracChangeset for help on using the changeset viewer.