HTML Viewer中的IdentifyAll工具只返回指定的可见图层的要素
2007-10-25 13:18
309 查看
HTML Viewer中的IdentifyAll工具默认返回所有可见图层的要素,
下面的定制使
HTML Viewer中的IdentifyAll工具只返回指定的可见图层的要素
例子:这个站点有5个图层cities, rivers,lakes,country和latlon,设置为只查看cities, rivers,lakes,country图层。见图
需要修改位于
<磁盘>/ArcIMS/Website/<Website_Name>文件夹中的ArcIMSParam.js和
<磁盘>/ArcIMS/Website/<Website_Name>/Javascript 目录中的aimsIdentify.js文件。
1.打开地图配置文件(后缀.AXL),创建用于HTML Viewer的服务,注意要查看的图层的ID值。
或从图层信息中查看
2.在文本编辑器中打开ArcIMSParam.js文件,作下列修改:
A.找到这行代码:
var useIdentify=true;
改为:var useIdentify=false;
B.将这行代码:
var useIdentifyAll=false;
改为:
var useIdentifyAll=true;
3.在文本编辑器中打开aimsIdentify.js:
A.找到:
aimsIdentifyPresent=true;
在这行代码后添加新变量如下,指名选择的层的ID(参见步骤1),ID间用逗号隔开。
var idLayers = "1,2,3,4";
B.找到identifyAll函数,将下列代码:
[Copy to clipboard] [ - ]
CODE:
for (var i=(LayerID.length-1);i>=0;i--) {
replyArray="";
if ((mapScaleFactor>=LayerMinScale) &&
(mapScaleFactor<=LayerMaxScale) && (LayerVisible) && (LayerIsFeature)) j =
i;
}
改为:
[Copy to clipboard] [ - ]
CODE:
for (var i=(LayerID.length-1);i>=0;i--) {
replyArray="";
var idLayer = idLayers.split(",");
var isLayerId = false;
for (var xx = 0; xx<idLayer.length; xx++){
if (LayerID==idLayer[xx]) isLayerId = true;
}
if (isLayerId){
if ((mapScaleFactor>=LayerMinScale) &&
(mapScaleFactor<=LayerMaxScale) && (LayerVisible) && (LayerIsFeature)) j =
i;
}
}
C.找到doIdentifyAll函数,将下列代码:
[Copy to clipboard] [ - ]
CODE:
if (fID < (LayerID.length)) {
if ((mapScaleFactor>=LayerMinScale[fID]) && (mapScaleFactor<=LayerMaxScale[fID]) && (LayerVisible[fID]) && (LayerIsFeature[fID])) {
theString = writeGetFeaturesDrill(idWest,idSouth,idEast,idNorth,fID);
//alert(theString);
sendToServer(imsQueryURL,theString,10);
} else {
doIdentifyAll("");
}
}
改为:
[Copy to clipboard] [ - ]
CODE:
if (fID < (LayerID.length)) {
var idLayer = idLayers.split(",");
var isLayerId = false;
for (var xx = 0; xx<idLayer.length; xx++){
if (LayerID[fID]==idLayer[xx]) isLayerId = true;
}
if (isLayerId){
if ((mapScaleFactor>=LayerMinScale[fID]) && (mapScaleFactor<=LayerMaxScale[fID]) && (LayerVisible[fID]) && (LayerIsFeature[fID])) {
theString = writeGetFeaturesDrill(idWest,idSouth,idEast,idNorth,fID);
//alert(theString);
sendToServer(imsQueryURL,theString,10);
}
} else {
doIdentifyAll("");
}
}
只查看cities, rivers,lakes,country图层
下面的定制使
HTML Viewer中的IdentifyAll工具只返回指定的可见图层的要素
例子:这个站点有5个图层cities, rivers,lakes,country和latlon,设置为只查看cities, rivers,lakes,country图层。见图
需要修改位于
<磁盘>/ArcIMS/Website/<Website_Name>文件夹中的ArcIMSParam.js和
<磁盘>/ArcIMS/Website/<Website_Name>/Javascript 目录中的aimsIdentify.js文件。
1.打开地图配置文件(后缀.AXL),创建用于HTML Viewer的服务,注意要查看的图层的ID值。
或从图层信息中查看
2.在文本编辑器中打开ArcIMSParam.js文件,作下列修改:
A.找到这行代码:
var useIdentify=true;
改为:var useIdentify=false;
B.将这行代码:
var useIdentifyAll=false;
改为:
var useIdentifyAll=true;
3.在文本编辑器中打开aimsIdentify.js:
A.找到:
aimsIdentifyPresent=true;
在这行代码后添加新变量如下,指名选择的层的ID(参见步骤1),ID间用逗号隔开。
var idLayers = "1,2,3,4";
B.找到identifyAll函数,将下列代码:
[Copy to clipboard] [ - ]
CODE:
for (var i=(LayerID.length-1);i>=0;i--) {
replyArray="";
if ((mapScaleFactor>=LayerMinScale) &&
(mapScaleFactor<=LayerMaxScale) && (LayerVisible) && (LayerIsFeature)) j =
i;
}
改为:
[Copy to clipboard] [ - ]
CODE:
for (var i=(LayerID.length-1);i>=0;i--) {
replyArray="";
var idLayer = idLayers.split(",");
var isLayerId = false;
for (var xx = 0; xx<idLayer.length; xx++){
if (LayerID==idLayer[xx]) isLayerId = true;
}
if (isLayerId){
if ((mapScaleFactor>=LayerMinScale) &&
(mapScaleFactor<=LayerMaxScale) && (LayerVisible) && (LayerIsFeature)) j =
i;
}
}
C.找到doIdentifyAll函数,将下列代码:
[Copy to clipboard] [ - ]
CODE:
if (fID < (LayerID.length)) {
if ((mapScaleFactor>=LayerMinScale[fID]) && (mapScaleFactor<=LayerMaxScale[fID]) && (LayerVisible[fID]) && (LayerIsFeature[fID])) {
theString = writeGetFeaturesDrill(idWest,idSouth,idEast,idNorth,fID);
//alert(theString);
sendToServer(imsQueryURL,theString,10);
} else {
doIdentifyAll("");
}
}
改为:
[Copy to clipboard] [ - ]
CODE:
if (fID < (LayerID.length)) {
var idLayer = idLayers.split(",");
var isLayerId = false;
for (var xx = 0; xx<idLayer.length; xx++){
if (LayerID[fID]==idLayer[xx]) isLayerId = true;
}
if (isLayerId){
if ((mapScaleFactor>=LayerMinScale[fID]) && (mapScaleFactor<=LayerMaxScale[fID]) && (LayerVisible[fID]) && (LayerIsFeature[fID])) {
theString = writeGetFeaturesDrill(idWest,idSouth,idEast,idNorth,fID);
//alert(theString);
sendToServer(imsQueryURL,theString,10);
}
} else {
doIdentifyAll("");
}
}
只查看cities, rivers,lakes,country图层
相关文章推荐
- Engine中执行gp工具返回的要素图层如何获取?
- AE控制图层中要素可见状态的几种方法
- [转载]AE控制图层中要素可见状态的几种方法
- 小工具---修改.shp文件,删除指定属性的要素(gdal, boost库)
- Arcgis engine 指定图层创建点要素
- 让指定slid值对于的图层可见
- Arcgis engine 指定图层创建点要素
- Arcgis engine 指定图层对要素进行创建、删除等操作
- AE控制图层中要素可见状态的几种方法
- AE控制图层中要素可见状态的几种方法
- Arcgis engine 指定图层创建点要素
- AE控制图层中要素可见状态的几种方法
- ArcGIS AO中控制图层中要素可见状态的总结
- 通用存储过程.分页存储过程..返回指定返回条数、指定页数的记录
- hibernate 返回对象指定属性,需要返回的列,可以直接返回 对象属性
- 如何指定让Android的NDK工具编译出Release版本或Debug版本的Native程序
- 返回指定成员所有下级成员的MDX语句
- VS2008 Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "正在执行生成后事件..."解决方案
- ArcGIS Desktop和Engine中对点要素图层Graduated Symbols渲染的实现 Rotation Symbol (转)
- postgresql 搜索指定距离内的记录 按近到远排序 并返回距离