查看: 1783|回复: 3

求教xyz驱动怎么写代码加载影像

[复制链接]

该用户从未签到

发表于 2017-10-13 18:59:28 | 显示全部楼层 |阅读模式
osgEarth:rivers::XYZOptions imagery;
                imagery.profile() = osgEarth:rofileOptions("global-mercator");
                imagery.url() = osgEarth::URI("http://mt[0123].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);

上面的代码加载不了,请各位大神看下有什么问题

该用户从未签到

发表于 2019-12-12 10:49:40 | 显示全部楼层
        osgEarth:rivers::XYZOptions googleImageOption;
        googleImageOption.url() = "h ttp://mt[0123].google.cn/vt/lyrs=y@258000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Ga";
        googleImageOption.profile() = osgEarth:rofileOptions("global-mercator");
        osgEarth::ImageLayerOptions imageLayerOption(googleImageOption);


        osg::ref_ptr<osgEarth::ImageLayer> _googleImage = new osgEarth::ImageLayer("GoogleImageLayer", imageLayerOption);
        mapNode->getMap()->addImageLayer(_googleImage);
我用以上代码顺利加载谷歌地图

该用户从未签到

发表于 2020-5-20 11:52:01 | 显示全部楼层
cll131421 发表于 2019-12-12 10:49
osgEarth:rivers::XYZOptions googleImageOption;
        googleImageOption.url() = "h ttp://mt[0123].goog ...

感谢!
  • TA的每日心情
    开心
    2020-3-20 17:50
  • 签到天数: 1 天

    [LV.1]初来乍到

    发表于 2020-5-27 14:59:45 | 显示全部楼层
    _format 这个要
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    OSG中国官方论坛-有您OSG在中国才更好

    网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

    联系我们

    • 工作时间:09:00--18:00
    • 反馈邮箱:1315785073@qq.com
    快速回复 返回顶部 返回列表