使用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;