我有一个 OpenLayers.Layer.GML 层,使用 MapFish 提供的 GeoJSON 数据构建。当我选择他的特征时,控制点就会显示出来,它们让我可以编辑特征的形状。好吧,我不想要他们!而且我不知道它们是如何出现的,也不知道为什么。控件、图层或地图中必须有一些设置来产生这个。
这是一个屏幕截图
我用来生成控件的代码是这样的:
_selectFeatureControl = new OpenLayers.Control.SelectFeature(
_activeLayer,
{
clickout: true,
toggle: true,
multiple: false,
hover: false,
toggleKey: "ctrlKey", // ctrl key removes from selection
multipleKey: "shiftKey" // shift key adds to selection
}
);
图层生成代码为:
layer = new OpenLayers.Layer.GML(
displayName,
url,
{
format: OpenLayers.Format.GeoJSON,
isBaseLayer: false,
visibility: true,
styleMap: styleMap,
projection: new OpenLayers.Projection("EPSG:4326")
}
);
谢谢大家!