首页 / 浏览问题 / 三维GIS / 问题详情
sql查询的时候url怎么定义
38EXP 2021年11月03日
let url = "http://221.192.134.202:8090/iserver/services/data-ZuoShuiHeSuiDao-2/rest/data/featureResults.rjson?returnContent=true";
      let param = {
        "getFeatureMode":"SQL",
        "datasetNames":["妫水河隧道设备_1:Building"],
        "hasGeometry":false,
        "queryParameter":{
          "attributeFilter":"ID = " + deviceId
        }
      }
      let queryObjJSON = JSON.stringify(param);

      $.ajax({
        type : "post",
        //contentType : "application/json;charset=UTF-8",
        url : url,
        data : queryObjJSON,
        success : function(result){
          let resultObj = JSON.parse(result);
          console.log(resultObj);
          //layerGuishuiheLane.setObjsColor(118, Cesium.Color.GREY);
        },
      })

我这个url是应该这样定义吗 为什么报错400啊 

还有datasetNames如何定义

1个回答

url没有问题,检查一下查询参数,数据源、数据集名称以及是有有‘ID’这个字段,还是说是以其他命名的
6,077EXP 2021年11月03日
layerGuishuiheLane.setObjsColor(cmId, Cesium.Color.GREY);

这个方法设置完颜色如何恢复到设置颜色之前的状态

removeObjsColor(ids)

removeAllObjsColor()

API地址:http://support.supermap.com.cn:8090/webgl/web/apis/3dwebgl.html  ;

多看API,里面都有

...