求教xyz驱动怎么写代码加载影像
osgEarth::Drivers::XYZOptions imagery;imagery.profile() = osgEarth::ProfileOptions("global-mercator");
imagery.url() = osgEarth::URI("http://mt.google.cn/vt/lyrs=s&hl=zh-CN&gl=cn&&x={x}&y={y}&z={z}");
osgEarth::ImageLayerOptions options("GoogleTest", imagery);
options.cacheId() = "GoogleTest";
osgEarth::ImageLayer* pImageLayer = new osgEarth::ImageLayer(options);
m_pMapNode->getMap()->addImageLayer(pImageLayer);
上面的代码加载不了,请各位大神看下有什么问题 osgEarth::Drivers::XYZOptions googleImageOption;
googleImageOption.url() = "h ttp://mt.google.cn/vt/lyrs=y@258000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Ga";
googleImageOption.profile() = osgEarth::ProfileOptions("global-mercator");
osgEarth::ImageLayerOptions imageLayerOption(googleImageOption);
osg::ref_ptr<osgEarth::ImageLayer> _googleImage = new osgEarth::ImageLayer("GoogleImageLayer", imageLayerOption);
mapNode->getMap()->addImageLayer(_googleImage);
我用以上代码顺利加载谷歌地图 cll131421 发表于 2019-12-12 10:49
osgEarth:rivers::XYZOptions googleImageOption;
googleImageOption.url() = "h ttp://mt.goog ...
感谢! _format 这个要
页:
[1]