|
发表于 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);
我用以上代码顺利加载谷歌地图 |
|