Ignore:
Timestamp:
Jun 4, 2014, 7:08:28 PM (10 years ago)
Author:
ldelgass
Message:

Add support for debug driver (shows tiles with x,y,LOD indices)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/geovis/RendererCmd.cpp

    r4349 r4374  
    2727#include <osgEarthSymbology/RenderSymbol>
    2828
     29#include <osgEarthDrivers/debug/DebugOptions>
    2930#include <osgEarthDrivers/gdal/GDALOptions>
    3031#include <osgEarthDrivers/tms/TMSOptions>
     
    779780    if (type[0] == 'i' && strcmp(type, "image") == 0) {
    780781        char *driver = Tcl_GetString(objv[4]);
    781         char *url =  Tcl_GetString(objv[5]);
    782 
    783         if (driver[0] == 'g' && strcmp(driver, "gdal") == 0) {
     782        char *url = NULL;
     783        if (objc > 6) {
     784            url =  Tcl_GetString(objv[5]);
     785        }
     786        if (driver[0] == 'd' && strcmp(driver, "debug") == 0) {
     787            osgEarth::Drivers::DebugOptions opts;
     788            char *name = Tcl_GetString(objv[5]);
     789            g_renderer->addImageLayer(name, opts);
     790        } else if (driver[0] == 'g' && strcmp(driver, "gdal") == 0) {
    784791            osgEarth::Drivers::GDALOptions opts;
    785792            opts.url() = url;
     
    10931100
    10941101static CmdSpec mapLayerOps[] = {
    1095     {"add",     1, MapLayerAddOp,       6, 0, "type url ?args? name"},
     1102    {"add",     1, MapLayerAddOp,       6, 0, "type driver ?url? ?args? name"},
    10961103    {"delete",  1, MapLayerDeleteOp,    3, 4, "?name?"},
    10971104    {"move",    1, MapLayerMoveOp,      5, 5, "pos name"},
Note: See TracChangeset for help on using the changeset viewer.