点击模型没反应

0 投票

使用v1001的产品包 点击模型 高亮有反应

使用v1010的产品包 点击模型 不高亮没有反应

模型代码如下

GeoModel geoModel = new GeoModel();
geoModel.fromFile(rootPath + "/SuperMap/LocalData/ceshi/grcdh/NewSGM.sgm", position);
geoModel.setRotationZ(90.0);
geoModel.getNodeAnimation().setEnabled(false);
Layer3D layer3d = m_sceneControl.getScene().getLayers().get("NodeAnimation");
GeoStyle3D geostyle3d = new GeoStyle3D();
geostyle3d.setAltitudeMode(AltitudeMode.ABSOLUTE);
GeoPlacemark geoPlacemark = new GeoPlacemark("UntitledFeature3D", geoModel);
geoPlacemark.setStyle3D(geostyle3d);
feature3d = layer3d.getFeatures().add(geoPlacemark);
feature3d.setName(s);
m_sceneControl.setAction(Action3D.PANSELECT3D);
tag_addmoxing = "0";

模型点击事件如下:

switch (event.getAction() & MotionEvent.ACTION_MASK) {
    case (MotionEvent.ACTION_UP): {
       layer3d = m_sceneControl.getScene().getLayers().get("NodeAnimation");
        Selection3D selection = layer3d.getSelection();
   // 点击模型无高亮反应  且 selection 值为0 
        if (selection.getCount() > 0) {
            // 自定义气泡控件
            QueryInfoBubblePopupWindow queryInfoBubble = new QueryInfoBubblePopupWindow(ZCTaishiActivity.this);
            Feature3Ds feature3Ds = layer3d.getFeatures();
            queryInfoBubble.additem(feature3Ds.findFeature(selection.get(0), Feature3DSearchOption.ALLFEATURES).getName(), list_zcmb);
            // 在气泡中展示查询内容
            queryInfoBubble.show(m_sceneControl, (int) event.getX(), (int) event.getY());
        }
    }
    break;
    case (MotionEvent.ACTION_DOWN): {
        Layer3D layer3d = m_sceneControl.getScene().getLayers().get("NodeAnimation");
        Selection3D selection = layer3d.getSelection();
        selection.clear();

    }
    break;

9月 22, 2020 分类:  128次浏览 | 用户: lixiaochuan 初出茅庐 (24 分)

1个回答

0 投票
您好,目前的版本通过kml图层加载模型确实无法选中。我这边报个缺陷,跟研发沟通一下,解决后回复您
9月 22, 2020 用户: 董懿鑫 登峰造极 (8,135 分)
好的,辛苦.
...