本文整理匯總了Java中org.gwtopenmaps.openlayers.client.control.WMSGetFeatureInfoOptions類的典型用法代碼示例。如果您正苦於以下問題:Java WMSGetFeatureInfoOptions類的具體用法?Java WMSGetFeatureInfoOptions怎麽用?Java WMSGetFeatureInfoOptions使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WMSGetFeatureInfoOptions類屬於org.gwtopenmaps.openlayers.client.control包,在下文中一共展示了WMSGetFeatureInfoOptions類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: WMSGetFeatureInfo
import org.gwtopenmaps.openlayers.client.control.WMSGetFeatureInfoOptions; //導入依賴的package包/類
public Control WMSGetFeatureInfo(final WMS layer) {
final WMSGetFeatureInfoOptions wmsGetFeatureInfoOptions = new WMSGetFeatureInfoOptions();
wmsGetFeatureInfoOptions.setMaxFeaturess(50);
wmsGetFeatureInfoOptions.setDrillDown(true);
if(layer != null) {
final List<WMS> layers = new ArrayList<WMS>();
layers.add(layer);
wmsGetFeatureInfoOptions.setTitle(layer.getName());
wmsGetFeatureInfoOptions.setLayers(layers.toArray(new WMS[]{}));
}
final WMSGetFeatureInfo wmsGetFeatureInfo = new WMSGetFeatureInfo(
wmsGetFeatureInfoOptions);
wmsGetFeatureInfo.addGetFeatureListener(getFeatureInfoListener());
return wmsGetFeatureInfo;
}